UnderlyingRequest and UnderlyingResponseWriter
Some checks are pending
Tests / Run Tests (1.23.x) (push) Waiting to run
Tests / Run Tests (1.24.x) (push) Waiting to run
Tests / Lint Code (push) Waiting to run
Tests / Build (push) Waiting to run

This commit is contained in:
Hein
2025-12-02 17:40:44 +02:00
parent abd045493a
commit 93df33e274
3 changed files with 23 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
package restheadspec
import (
"net/http"
"testing"
)
@@ -42,6 +43,12 @@ func (m *MockRequest) AllQueryParams() map[string]string {
return m.queryParams
}
func (m *MockRequest) UnderlyingRequest() *http.Request {
// For testing purposes, return nil
// In real scenarios, you might want to construct a proper http.Request
return nil
}
func TestParseOptionsFromQueryParams(t *testing.T) {
handler := NewHandler(nil, nil)