2 Commits

Author SHA1 Message Date
Abhiyan Khanal
3f607b8662 fix(test): use stdlib constants for HTTP methods in test helpers
Replace string literals with http.Method* constants to satisfy
the usestdlibvars linter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 19:09:51 +05:45
Abhiyan Khanal
4a0302068c feat(test): add RunTestHandler to flush status in test contexts
When using CreateTestContext directly to test handlers, ctx.Status()
sets the status internally but it is not flushed to the underlying
httptest.ResponseRecorder. RunTestHandler creates a test context, runs
the handler chain, and calls WriteHeaderNow() so that the status code
is properly reflected in the ResponseWriter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 19:09:51 +05:45