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

Function testPathParam

request_test.go:689–696  ·  view source on GitHub ↗
(t *testing.T, c *Client)

Source from the content-addressed store, hash-verified

687}
688
689func testPathParam(t *testing.T, c *Client) {
690 username := "imroc"
691 resp, err := c.R().
692 SetPathParam("username", username).
693 Get("/user/{username}/profile")
694 assertSuccess(t, resp, err)
695 tests.AssertEqual(t, fmt.Sprintf("%s's profile", username), resp.String())
696}
697
698func TestSuccess(t *testing.T) {
699 testWithAllTransport(t, testSuccess)

Callers 1

TestPathParamFunction · 0.85

Calls 6

AssertEqualFunction · 0.92
assertSuccessFunction · 0.85
SetPathParamMethod · 0.80
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…