From a27d03e799f33b38ffdc3b39f1373a05554a393c Mon Sep 17 00:00:00 2001 From: Juan Basso Date: Fri, 29 Jul 2016 13:03:36 -0400 Subject: [PATCH] Fixed typo and removed unused vars Refs #408 --- github/github.go | 2 +- github/timestamp_test.go | 6 ++++++ tests/integration/users_test.go | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/github/github.go b/github/github.go index a64d76c..0b58e73 100644 --- a/github/github.go +++ b/github/github.go @@ -414,7 +414,7 @@ func (c *Client) Do(req *http.Request, v interface{}) (*Response, error) { // checkRateLimitBeforeDo does not make any network calls, but uses existing knowledge from // current client state in order to quickly check if *RateLimitError can be immediately returned -// from Client.Do, and if so, returns it so that Client.Do can skip making a network API call unneccessarily. +// from Client.Do, and if so, returns it so that Client.Do can skip making a network API call unnecessarily. // Otherwise it returns nil, and Client.Do should proceed normally. func (c *Client) checkRateLimitBeforeDo(req *http.Request, rateLimitCategory rateLimitCategory) error { c.rateMu.Lock() diff --git a/github/timestamp_test.go b/github/timestamp_test.go index 12376c5..997b43d 100644 --- a/github/timestamp_test.go +++ b/github/timestamp_test.go @@ -93,6 +93,9 @@ func TestTimstamp_MarshalReflexivity(t *testing.T) { } var got Timestamp err = json.Unmarshal(data, &got) + if err != nil { + t.Errorf("%s: Unmarshal err=%v", tc.desc, err) + } if !got.Equal(tc.data) { t.Errorf("%s: %+v != %+v", tc.desc, got, data) } @@ -174,6 +177,9 @@ func TestWrappedTimstamp_MarshalReflexivity(t *testing.T) { } var got WrappedTimestamp err = json.Unmarshal(bytes, &got) + if err != nil { + t.Errorf("%s: Unmarshal err=%v", tc.desc, err) + } if !got.Time.Equal(tc.data.Time) { t.Errorf("%s: %+v != %+v", tc.desc, got, tc.data) } diff --git a/tests/integration/users_test.go b/tests/integration/users_test.go index 9d6764f..5c84ac3 100644 --- a/tests/integration/users_test.go +++ b/tests/integration/users_test.go @@ -87,6 +87,9 @@ func TestUsers_Update(t *testing.T) { // set location back to the original value u.Location = &location _, _, err = client.Users.Edit(u) + if err != nil { + t.Fatalf("Users.Edit returned error: %v", err) + } } func TestUsers_Emails(t *testing.T) {