Skip to content

Commit

Permalink
TestGetOAuthToken fix
Browse files Browse the repository at this point in the history
  • Loading branch information
antoine2116 committed Oct 16, 2023
1 parent e5be3a6 commit 5b158d2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions choruspro_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,15 @@ func TestGetOAuthToken(t *testing.T) {
want := &oauth2.Token{
AccessToken: "token",
TokenType: "Bearer",
Expiry: time.Now().Add(time.Hour),
Expiry: time.Now().Add(time.Hour), // unable to test this (time is not equal cause of nanoseconds)
}

if token.AccessToken != want.AccessToken {
t.Errorf("getOAuthToken returned AccessToken = %+v, want %+v", token, want)
}
if !reflect.DeepEqual(token, want) {
t.Errorf("getOAuthToken returned %+v, want %+v", token, want)

if token.TokenType != want.TokenType {
t.Errorf("getOAuthToken returned TokenType = %+v, want %+v", token, want)
}
}

Expand Down

0 comments on commit 5b158d2

Please sign in to comment.