@@ -22,12 +22,14 @@ func (m MyCustomClaims) Validate() error {
22
22
23
23
func Test_Validator_Validate (t * testing.T ) {
24
24
type fields struct {
25
- leeway time.Duration
26
- timeFunc func () time.Time
27
- verifyIat bool
28
- expectedAud string
29
- expectedIss string
30
- expectedSub string
25
+ leeway time.Duration
26
+ timeFunc func () time.Time
27
+ verifyIat bool
28
+ expectedAud string
29
+ expectedAuds []string
30
+ expectedAudsMatchAll bool
31
+ expectedIss string
32
+ expectedSub string
31
33
}
32
34
type args struct {
33
35
claims Claims
@@ -72,12 +74,14 @@ func Test_Validator_Validate(t *testing.T) {
72
74
for _ , tt := range tests {
73
75
t .Run (tt .name , func (t * testing.T ) {
74
76
v := & Validator {
75
- leeway : tt .fields .leeway ,
76
- timeFunc : tt .fields .timeFunc ,
77
- verifyIat : tt .fields .verifyIat ,
78
- expectedAud : tt .fields .expectedAud ,
79
- expectedIss : tt .fields .expectedIss ,
80
- expectedSub : tt .fields .expectedSub ,
77
+ leeway : tt .fields .leeway ,
78
+ timeFunc : tt .fields .timeFunc ,
79
+ verifyIat : tt .fields .verifyIat ,
80
+ expectedAud : tt .fields .expectedAud ,
81
+ expectedAuds : tt .fields .expectedAuds ,
82
+ expectedAudsMatchAll : tt .fields .expectedAudsMatchAll ,
83
+ expectedIss : tt .fields .expectedIss ,
84
+ expectedSub : tt .fields .expectedSub ,
81
85
}
82
86
if err := v .Validate (tt .args .claims ); (err != nil ) && ! errors .Is (err , tt .wantErr ) {
83
87
t .Errorf ("validator.Validate() error = %v, wantErr %v" , err , tt .wantErr )
0 commit comments