Skip to content

Commit

Permalink
Correctly handle error when building test request contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Eddy committed Apr 17, 2018
1 parent 3291985 commit 6bef62d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mw/auth/jwt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ func TestGetJWTField(t *testing.T) {
ctx := context.Background()
if len(test.claims) != 0 {
token := makeToken(test.claims, t)
ctx, _ = contextWithToken(token)
c, err := contextWithToken(token)
if err != nil {
t.Fatalf("Error when building request context: %v", err)
}
ctx = c
}
actual, err := GetJWTField(ctx, test.field, nil)
if err != test.err {
Expand Down

0 comments on commit 6bef62d

Please sign in to comment.