Update the example in the README

The example used an outdated method `CallsTo` which is no longer generated when creating a mock.
This commit is contained in:
Dmitry Matrosov 2017-09-11 09:54:35 +10:00 committed by GitHub
parent 3dc8438cf7
commit cbc95e6b5a

View File

@ -74,8 +74,9 @@ func TestCompleteSignup(t *testing.T) {
CompleteSignUp("me@email.com", mockedEmailSender) CompleteSignUp("me@email.com", mockedEmailSender)
if mockedEmailSender.CallsTo.Send != 1 { callsToSend := len(mockedEmailSender.SendCalls())
t.Errorf("Send was called %d times", mockedEmailSender.CallsTo.Send) if callsToSend != 1 {
t.Errorf("Send was called %d times", callsToSend)
} }
if sentTo != "me@email.com" { if sentTo != "me@email.com" {
t.Errorf("unexpected recipient: %s", sentTo) t.Errorf("unexpected recipient: %s", sentTo)