Skip to content

Commit 4ef8b3a

Browse files
mdariiMaxim Darii
authored andcommitted
fix test
1 parent e9d852a commit 4ef8b3a

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

jwt/jwt_test.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -276,16 +276,12 @@ func TestJWTFetch_AssertionPayload(t *testing.T) {
276276
} // Check audience handling per RFC 7519
277277
var expectedAud interface{}
278278
if len(conf.Audiences) > 0 {
279-
if len(conf.Audiences) == 1 {
280-
expectedAud = conf.Audiences[0]
281-
} else {
282-
// When JSON unmarshals an array, it becomes []interface{}
283-
expectedAudSlice := make([]interface{}, len(conf.Audiences))
284-
for i, aud := range conf.Audiences {
285-
expectedAudSlice[i] = aud
286-
}
287-
expectedAud = expectedAudSlice
279+
// When JSON unmarshals an array, it becomes []interface{}
280+
expectedAudSlice := make([]interface{}, len(conf.Audiences))
281+
for i, aud := range conf.Audiences {
282+
expectedAudSlice[i] = aud
288283
}
284+
expectedAud = expectedAudSlice
289285
} else if conf.Audience != "" {
290286
expectedAud = conf.Audience
291287
} else {

0 commit comments

Comments
 (0)