testify icon indicating copy to clipboard operation
testify copied to clipboard

mock: fix erroneous calledWithArgs messages

Open kleinerhund opened this issue 3 years ago • 0 comments

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

kleinerhund avatar Aug 23 '22 16:08 kleinerhund