MCPcopy
hub / github.com/expr-lang/expr / TestHttpBodyWrappers

Function TestHttpBodyWrappers

internal/testify/assert/http_assertions_test.go:203–214  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

201}
202
203func TestHttpBodyWrappers(t *testing.T) {
204 assert := New(t)
205 mockAssert := New(new(testing.T))
206
207 assert.True(mockAssert.HTTPBodyContains(httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "Hello, World!"))
208 assert.True(mockAssert.HTTPBodyContains(httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "World"))
209 assert.False(mockAssert.HTTPBodyContains(httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "world"))
210
211 assert.False(mockAssert.HTTPBodyNotContains(httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "Hello, World!"))
212 assert.False(mockAssert.HTTPBodyNotContains(httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "World"))
213 assert.True(mockAssert.HTTPBodyNotContains(httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "world"))
214}

Callers

nothing calls this directly

Calls 5

NewFunction · 0.70
TrueMethod · 0.45
HTTPBodyContainsMethod · 0.45
FalseMethod · 0.45
HTTPBodyNotContainsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…