MCPcopy
hub / github.com/stretchr/testify / TestHTTPRequestWithNoParams

Function TestHTTPRequestWithNoParams

assert/http_assertions_test.go:165–178  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

163}
164
165func TestHTTPRequestWithNoParams(t *testing.T) {
166 t.Parallel()
167
168 var got *http.Request
169 handler := func(w http.ResponseWriter, r *http.Request) {
170 got = r
171 w.WriteHeader(http.StatusOK)
172 }
173
174 True(t, HTTPSuccess(t, handler, "GET", "/url", nil))
175
176 Empty(t, got.URL.Query())
177 Equal(t, "/url", got.URL.RequestURI())
178}
179
180func TestHTTPRequestWithParams(t *testing.T) {
181 t.Parallel()

Callers

nothing calls this directly

Calls 5

WriteHeaderMethod · 0.80
TrueFunction · 0.70
HTTPSuccessFunction · 0.70
EmptyFunction · 0.70
EqualFunction · 0.70

Tested by

no test coverage detected