MCPcopy Create free account
hub / github.com/amp-labs/connectors / TestHTTPClient_GetURL_RelativeURLWithBase

Function TestHTTPClient_GetURL_RelativeURLWithBase

common/http_test.go:928–940  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

926}
927
928func TestHTTPClient_GetURL_RelativeURLWithBase(t *testing.T) {
929 t.Parallel()
930
931 client := &HTTPClient{
932 Base: "https://api.example.com",
933 }
934 urlStr := "/users"
935
936 result, err := client.getURL(urlStr)
937
938 require.NoError(t, err)
939 assert.Equal(t, "https://api.example.com/users", result)
940}
941
942func TestHTTPClient_GetURL_RelativeURLNoBase(t *testing.T) {
943 t.Parallel()

Callers

nothing calls this directly

Calls 1

getURLMethod · 0.95

Tested by

no test coverage detected