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:
parent
3dc8438cf7
commit
cbc95e6b5a
@ -74,8 +74,9 @@ func TestCompleteSignup(t *testing.T) {
|
||||
|
||||
CompleteSignUp("me@email.com", mockedEmailSender)
|
||||
|
||||
if mockedEmailSender.CallsTo.Send != 1 {
|
||||
t.Errorf("Send was called %d times", mockedEmailSender.CallsTo.Send)
|
||||
callsToSend := len(mockedEmailSender.SendCalls())
|
||||
if callsToSend != 1 {
|
||||
t.Errorf("Send was called %d times", callsToSend)
|
||||
}
|
||||
if sentTo != "me@email.com" {
|
||||
t.Errorf("unexpected recipient: %s", sentTo)
|
||||
|
Loading…
Reference in New Issue
Block a user