MCPcopy Create free account
hub / github.com/gavv/httpexpect / TestResponse_Alias

Function TestResponse_Alias

response_test.go:128–138  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

126}
127
128func TestResponse_Alias(t *testing.T) {
129 reporter := newMockReporter(t)
130
131 value := NewResponse(reporter, &http.Response{}, time.Second)
132 assert.Equal(t, []string{"Response()"}, value.chain.context.Path)
133 assert.Equal(t, []string{"Response()"}, value.chain.context.AliasedPath)
134
135 value.Alias("foo")
136 assert.Equal(t, []string{"Response()"}, value.chain.context.Path)
137 assert.Equal(t, []string{"foo"}, value.chain.context.AliasedPath)
138}
139
140func TestResponse_RoundTripTime(t *testing.T) {
141 t.Run("provided", func(t *testing.T) {

Callers

nothing calls this directly

Calls 4

AliasMethod · 0.95
newMockReporterFunction · 0.85
NewResponseFunction · 0.85
EqualMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…