testify
testify copied to clipboard
mock: fix erroneous calledWithArgs messages
Summary
AssertCalled(...) displays output from other methods when the assertion fails.
Changes
Added a check that the called method name matches that of the asserted method name. Same as in AssertNumberOfCalls(...).
Motivation
AssertCalled(...) fails for the correct assertion, however the output displayed can sometimes indicate that the method was called with arguments from other methods.
Related issues
Closes #1144