Created
December 27, 2017 15:11
-
-
Save caalberts/1b313de6b38a05aba65ebec1a3f1e1db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func TestUpdateAccountUpdatesAccountWithNewData(t *testing.T) { | |
repository := createRepositoryWithData(fakeData) | |
newBalance := "200" | |
updateValue := map[string]interface{}{"Balance": newBalance} | |
account, err := repository.UpdateAccount(id, updateValue) | |
assert.Equal(t, id, account.Id) | |
assert.Equal(t, "John Doe", account.Name) | |
assert.Equal(t, 200, account.Balance) | |
assert.Nil(t, err) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment