MCPcopy Create free account
hub / github.com/evcc-io/evcc / TestSetPath

Method TestSetPath

plugin/http_test.go:114–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

112}
113
114func (suite *httpTestSuite) TestSetPath() {
115 uri := suite.srv.URL + "/foo/bar/{{.baz}}"
116 p := NewHTTP(util.NewLogger("foo"), http.MethodGet, uri, false, 0)
117
118 s, err := p.StringSetter("baz")
119 suite.Require().NoError(err)
120 suite.Require().NoError(s("4711"))
121 suite.Require().Equal("/foo/bar/4711", suite.h.req.URL.String())
122}

Callers

nothing calls this directly

Calls 4

StringSetterMethod · 0.95
NewLoggerFunction · 0.92
NewHTTPFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected