-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
call.Unset() panics when call := mockObj.On("Foo", mock.AnythingOfType("foo")) #1599
Comments
from locally debugging, I have the impression the call to
which does the trick. Happy to make a PR |
Suffering from the same bug when trying to mock argument of type |
Aaah Unset, how I lothe thee.
This bug also occurs with the exported This bug also occurs with The best workaround is to never use |
Description
When you use
mock.AnythingOfType("foo")
inOn(...)
and then try to callUnset()
on the resulting call, the code panics.Step To Reproduce
Here is a simple snippet that reproduces the issue:
Expected behavior
I expect to be able to call
Unset()
on acall
that has been mocked withmock.AnythingOfType
(or did I miss something on how to use the API? Happy to get feedback here :-))
Actual behavior
When calling
Unset()
on acall
that has been mocked withmock.AnythingOfType
, it panics.The text was updated successfully, but these errors were encountered: