Skip to content

Commit

Permalink
Adding test for nonHijacker
Browse files Browse the repository at this point in the history
Signed-off-by: rehanpfmr <111350825+rehanpfmr@users.noreply.github.com>
  • Loading branch information
rehanpfmr authored Aug 27, 2024
1 parent 76a7bb9 commit 2179b86
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ func (m *mockHijacker) Hijack() (net.Conn, *bufio.ReadWriter, error) {
return conn, bufio.NewReadWriter(bufio.NewReader(rw), bufio.NewWriter(rw)), nil
}

type mockNonHijacker struct {
http.ResponseWriter
}

func TestRecordingResponseWriterHijack(t *testing.T) {
mockWriter := &mockHijacker{httptest.NewRecorder()}
recWriter := &recordingResponseWriter{writer: mockWriter}
Expand Down

0 comments on commit 2179b86

Please sign in to comment.