Fix ineffectual assignments

- Don't assign variables we don't end up using
- Added missing error check in test
This commit is contained in:
Christian Muehlhaeuser 2019-08-08 09:21:21 +00:00 committed by mattn
parent 1ccf66b8b4
commit 1b7f743892
4 changed files with 14 additions and 11 deletions

View file

@ -57,11 +57,11 @@ func TestGetAccountLists(t *testing.T) {
ClientSecret: "bar",
AccessToken: "zoo",
})
lists, err := client.GetAccountLists(context.Background(), "2")
_, err := client.GetAccountLists(context.Background(), "2")
if err == nil {
t.Fatalf("should be fail: %v", err)
}
lists, err = client.GetAccountLists(context.Background(), "1")
lists, err := client.GetAccountLists(context.Background(), "1")
if err != nil {
t.Fatalf("should not be fail: %v", err)
}
@ -93,11 +93,11 @@ func TestGetListAccounts(t *testing.T) {
ClientSecret: "bar",
AccessToken: "zoo",
})
accounts, err := client.GetListAccounts(context.Background(), "2")
_, err := client.GetListAccounts(context.Background(), "2")
if err == nil {
t.Fatalf("should be fail: %v", err)
}
accounts, err = client.GetListAccounts(context.Background(), "1")
accounts, err := client.GetListAccounts(context.Background(), "1")
if err != nil {
t.Fatalf("should not be fail: %v", err)
}