Tests WebSocket upgrade with POST method in demo mode, ensuring the websocket check branch is exercised after the GET/HEAD/OPTIONS check. Coverage: 90% to 100%.
26 test cases covering: - Demo mode disabled (all requests pass through) - Demo mode enabled with read-only methods (GET/HEAD/OPTIONS allowed) - WebSocket upgrade handling (case-insensitive) - Auth endpoint allowlist (login, OIDC, logout) - Modification request blocking (POST/PUT/DELETE/PATCH) - Partial path match rejection (security) - Response format verification (JSON error response) First test file for demo_middleware.go. Tests verify correct header setting (X-Demo-Mode) and error response structure.