MCPcopy Create free account
hub / github.com/imroc/req / TestSetBaseURL

Function TestSetBaseURL

client_test.go:501–505  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

499}
500
501func TestSetBaseURL(t *testing.T) {
502 baseURL := "http://dummy-req.local/test"
503 resp, _ := tc().SetTimeout(time.Nanosecond).SetBaseURL(baseURL).R().Get("/req")
504 tests.AssertEqual(t, baseURL+"/req", resp.Request.RawRequest.URL.String())
505}
506
507func TestSetCommonFormDataFromValues(t *testing.T) {
508 expectedForm := make(url.Values)

Callers

nothing calls this directly

Calls 7

AssertEqualFunction · 0.92
tcFunction · 0.85
RMethod · 0.80
SetBaseURLMethod · 0.80
SetTimeoutMethod · 0.80
GetMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…