Skip to content

Commit

Permalink
test: fixed failing unit test
Browse files Browse the repository at this point in the history
Signed-off-by: vickysomtee <[email protected]>
  • Loading branch information
Vickysomtee committed Apr 19, 2024
1 parent 2ff007a commit 129c058
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (client *apiClient) auth(ctx context.Context) (int, error) {
}

if oauthResponse.AccessToken == "" {
return http.StatusInternalServerError, ErrAuthenticationFailed
return http.StatusUnauthorized, ErrAuthenticationFailed
}

client.config.oAuthCredentials.accessToken = oauthResponse.AccessToken
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func TestAPIClientAuthError(t *testing.T) {

require.ErrorIs(t, err, ErrRequestFailed)
require.Empty(t, resp)
require.Equal(t, http.StatusUnauthorized, code)
require.Equal(t, http.StatusInternalServerError, code)
}

func TestAPIClientAuthNoToken(t *testing.T) {
Expand Down

0 comments on commit 129c058

Please sign in to comment.