summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/responsewriter_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/caddyhttp/responsewriter_test.go')
-rw-r--r--modules/caddyhttp/responsewriter_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/caddyhttp/responsewriter_test.go b/modules/caddyhttp/responsewriter_test.go
index 1913932..492fcad 100644
--- a/modules/caddyhttp/responsewriter_test.go
+++ b/modules/caddyhttp/responsewriter_test.go
@@ -95,6 +95,14 @@ func TestResponseWriterWrapperReadFrom(t *testing.T) {
}
}
+func TestResponseWriterWrapperUnwrap(t *testing.T) {
+ w := &ResponseWriterWrapper{&baseRespWriter{}}
+
+ if _, ok := w.Unwrap().(*baseRespWriter); !ok {
+ t.Errorf("Unwrap() doesn't return the underlying ResponseWriter")
+ }
+}
+
func TestResponseRecorderReadFrom(t *testing.T) {
tests := map[string]struct {
responseWriter responseWriterSpy