Skip to content

Instantly share code, notes, and snippets.

@caalberts
Created December 27, 2017 15:11
Show Gist options
  • Save caalberts/1b313de6b38a05aba65ebec1a3f1e1db to your computer and use it in GitHub Desktop.
Save caalberts/1b313de6b38a05aba65ebec1a3f1e1db to your computer and use it in GitHub Desktop.
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