File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -15,15 +15,9 @@ func TestStoreWebToken_WithFakeBearerToken(t *testing.T) {
1515 authHeader := "Bearer " + token
1616
1717 nextHandler := http .HandlerFunc (func (w http.ResponseWriter , r * http.Request ) {
18- // Token parsing may fail due to signature validation, which is expected in tests
19- // The middleware should handle this gracefully
2018 _ , err := context .GetWebTokenFromContext (r .Context ())
21- // In a real scenario with proper JWT validation, this might fail
22- // For test purposes, we just verify the middleware doesn't crash
23- if err != nil {
24- // This is expected behavior when token validation fails
25- assert .Error (t , err )
26- }
19+ // Presence of a Bearer header must result in a stored token.
20+ assert .NoError (t , err )
2721
2822 w .WriteHeader (http .StatusOK )
2923 })
You can’t perform that action at this time.
0 commit comments