File tree 1 file changed +9
-8
lines changed
1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -706,16 +706,17 @@ func TestCORSWithConfig_PreflightStatusCode(t *testing.T) {
706
706
e := echo .New ()
707
707
708
708
for _ , tc := range tests {
709
- req := httptest .NewRequest (http .MethodOptions , "/" , nil )
710
- rec := httptest .NewRecorder ()
711
-
712
- c := e .NewContext (req , rec )
709
+ t .Run (tc .name , func (t * testing.T ) {
710
+ req := httptest .NewRequest (http .MethodOptions , "/" , nil )
711
+ rec := httptest .NewRecorder ()
713
712
714
- cors := tc .mw (echo .NotFoundHandler )
715
- err := cors (c )
713
+ c := e .NewContext (req , rec )
716
714
717
- assert . NoError ( t , err )
718
- assert . Equal ( t , rec . Result (). StatusCode , tc . expectedStatusCode )
715
+ cors := tc . mw ( echo . NotFoundHandler )
716
+ err := cors ( c )
719
717
718
+ assert .NoError (t , err )
719
+ assert .Equal (t , rec .Result ().StatusCode , tc .expectedStatusCode )
720
+ })
720
721
}
721
722
}
You can’t perform that action at this time.
0 commit comments