From 84e2423404381868ce17a659342774bc5f3e48b1 Mon Sep 17 00:00:00 2001 From: Boris Pruessmann Date: Fri, 3 Jul 2015 13:30:03 +0200 Subject: [PATCH] AssertNumberOfCalls: wrong order of arguments The assert.Equal called had the actual and expected values mixed up. --- mock/mock.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mock/mock.go b/mock/mock.go index 007643f..515eec7 100644 --- a/mock/mock.go +++ b/mock/mock.go @@ -352,7 +352,7 @@ func (m *Mock) AssertNumberOfCalls(t TestingT, methodName string, expectedCalls actualCalls++ } } - return assert.Equal(t, actualCalls, expectedCalls, fmt.Sprintf("Expected number of calls (%d) does not match the actual number of calls (%d).", expectedCalls, actualCalls)) + return assert.Equal(t, expectedCalls, actualCalls, fmt.Sprintf("Expected number of calls (%d) does not match the actual number of calls (%d).", expectedCalls, actualCalls)) } // AssertCalled asserts that the method was called.