Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
#286 change test for multiple audiences validation
Browse files Browse the repository at this point in the history
  • Loading branch information
shnmorimoto committed Mar 26, 2022
1 parent 4342d90 commit 07268a3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions jwt/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ func TestFieldsMatch(t *testing.T) {
assert.NoError(t, c.Validate(v))
}

claimsWithSingleAudience := Claims{
Issuer: "issuer",
Subject: "subject",
Audience: []string{"a1"},
ID: "42",
}

for _, v := range valid {
assert.NoError(t, claimsWithSingleAudience.Validate(v))
}

invalid := []struct {
Expected Expected
Error error
Expand Down

0 comments on commit 07268a3

Please sign in to comment.