From 8bc6fdaaceaabcc701f3c1e1d149ee0d86d7ee2e Mon Sep 17 00:00:00 2001 From: Tom Thorogood Date: Mon, 4 Dec 2017 23:20:56 +1030 Subject: [PATCH] Remove Content-Type test from TestGzipHandler This functionality is already tested in TestInferContentType which is more obvious and correct. --- gzip_test.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/gzip_test.go b/gzip_test.go index 9a078a8..0a701ea 100644 --- a/gzip_test.go +++ b/gzip_test.go @@ -49,15 +49,6 @@ func TestGzipHandler(t *testing.T) { assert.Equal(t, "gzip", res2.Header.Get("Content-Encoding")) assert.Equal(t, "Accept-Encoding", res2.Header.Get("Vary")) assert.Equal(t, gzipStrLevel(testBody, DefaultCompression), resp2.Body.Bytes()) - - // content-type header is correctly set based on uncompressed body - - req3 := httptest.NewRequest(http.MethodGet, "/whatever", nil) - req3.Header.Set("Accept-Encoding", "gzip") - res3 := httptest.NewRecorder() - handler.ServeHTTP(res3, req3) - - assert.Equal(t, http.DetectContentType([]byte(testBody)), res3.Header().Get("Content-Type")) } func TestGzipLevelHandler(t *testing.T) {