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

Function TestRequest_Constructors

request_test.go:83–99  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

81}
82
83func TestRequest_Constructors(t *testing.T) {
84 t.Run("config", func(t *testing.T) {
85 reporter := newMockReporter(t)
86 config := newMockConfig(reporter)
87 req := NewRequestC(config, "GET", "")
88 req.chain.assert(t, success)
89 })
90
91 t.Run("chain", func(t *testing.T) {
92 chain := newMockChain(t)
93 reporter := newMockReporter(t)
94 config := newMockConfig(reporter)
95 req := newRequest(chain, config, "GET", "")
96 assert.NotSame(t, req.chain, chain)
97 assert.Equal(t, req.chain.context.Path, chain.context.Path)
98 })
99}
100
101func TestRequest_Reentrancy(t *testing.T) {
102 t.Run("call from reporter", func(t *testing.T) {

Callers

nothing calls this directly

Calls 7

newMockReporterFunction · 0.85
newMockConfigFunction · 0.85
NewRequestCFunction · 0.85
newMockChainFunction · 0.85
newRequestFunction · 0.85
assertMethod · 0.80
EqualMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…