(t *testing.T)
| 86 | } |
| 87 | |
| 88 | func TestResponse_Constructors(t *testing.T) { |
| 89 | t.Run("reporter", func(t *testing.T) { |
| 90 | reporter := newMockReporter(t) |
| 91 | resp := NewResponse(reporter, &http.Response{}) |
| 92 | resp.chain.assert(t, success) |
| 93 | }) |
| 94 | |
| 95 | t.Run("config", func(t *testing.T) { |
| 96 | reporter := newMockReporter(t) |
| 97 | resp := NewResponseC(Config{ |
| 98 | Reporter: reporter, |
| 99 | }, &http.Response{}) |
| 100 | resp.chain.assert(t, success) |
| 101 | }) |
| 102 | |
| 103 | t.Run("chain", func(t *testing.T) { |
| 104 | chain := newMockChain(t) |
| 105 | reporter := newMockReporter(t) |
| 106 | config := newMockConfig(reporter) |
| 107 | value := newResponse(responseOpts{ |
| 108 | config: config, |
| 109 | chain: chain, |
| 110 | httpResp: &http.Response{}, |
| 111 | }) |
| 112 | assert.NotSame(t, value.chain, chain) |
| 113 | assert.Equal(t, value.chain.context.Path, chain.context.Path) |
| 114 | }) |
| 115 | } |
| 116 | |
| 117 | func TestResponse_Raw(t *testing.T) { |
| 118 | reporter := newMockReporter(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…