MCPcopy Index your code
hub / github.com/imroc/req / TestSetCommonQueryParamsFromStruct

Function TestSetCommonQueryParamsFromStruct

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

Source from the content-addressed store, hash-verified

341}
342
343func TestSetCommonQueryParamsFromStruct(t *testing.T) {
344 type QueryParams struct {
345 Test string `url:"test"`
346 Key string `url:"key"`
347 }
348 params := QueryParams{
349 Test: "test",
350 Key: "value",
351 }
352 resp, err := tc().SetCommonQueryParamsFromStruct(params).R().Get("/query-parameter")
353 assertSuccess(t, resp, err)
354 tests.AssertEqual(t, "key=value&test=test", resp.String())
355}
356
357func TestInsecureSkipVerify(t *testing.T) {
358 c := tc().EnableInsecureSkipVerify()

Callers

nothing calls this directly

Calls 7

AssertEqualFunction · 0.92
tcFunction · 0.85
assertSuccessFunction · 0.85
RMethod · 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…