Skip to content

Commit

Permalink
Merge pull request #4835 from Abirdcfly/patch-1
Browse files Browse the repository at this point in the history
fix minor unreachable code caused by t.Fatal
  • Loading branch information
echlebek authored Aug 15, 2022
2 parents 441a94c + b4f4dcb commit 3a3a819
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/api/authentication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ func TestCreateAccessToken(t *testing.T) {
authn := NewAuthenticationClient(test.Authenticator(store))
tokens, err := authn.CreateAccessToken(test.Context(), test.Username, test.Password)
if test.WantError && err == nil {
t.Fatal("want error, got nil")
if test.Error != nil && test.Error != err {
t.Fatalf("bad error: got %v, want %v", err, test.Error)
t.Errorf("bad error: got %v, want %v", err, test.Error)
}
t.Fatal("want error, got nil")
}
if !test.WantError && err != nil {
t.Fatal(err)
Expand Down

0 comments on commit 3a3a819

Please sign in to comment.