aboutsummaryrefslogtreecommitdiff
path: root/http_test.go
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2022-11-27 16:05:13 +0000
committerGrégoire Duchêne <gduchene@awhk.org>2022-11-27 16:05:13 +0000
commit10843b7318e949fcd3120d843352271ef198be11 (patch)
tree41bad32a1b8cf32ac9016864e65532d87ea10cdd /http_test.go
parent98ddf347d3c2430a4c354621ee746c8252257bda (diff)
Fix typo in header namev0.2.1
Diffstat (limited to 'http_test.go')
-rw-r--r--http_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/http_test.go b/http_test.go
index a8c3cb5..f099cd3 100644
--- a/http_test.go
+++ b/http_test.go
@@ -36,7 +36,7 @@ func TestFilteringHTTPHandler(s *testing.T) {
name: "WhenFiltered",
method: http.MethodGet,
- expHeader: http.Header{"Allowed": {"HEAD"}},
+ expHeader: http.Header{"Allow": {"HEAD"}},
expStatusCode: http.StatusMethodNotAllowed,
},
} {
@@ -62,7 +62,7 @@ func TestFilterHTTPMethod(s *testing.T) {
name string
method string
- expAllowed string
+ expAllow string
expFiltered bool
expStatusCode int
}{
@@ -77,7 +77,7 @@ func TestFilterHTTPMethod(s *testing.T) {
name: "WhenFiltered",
method: http.MethodHead,
- expAllowed: "GET, POST",
+ expAllow: "GET, POST",
expFiltered: true,
expStatusCode: http.StatusMethodNotAllowed,
},
@@ -90,7 +90,7 @@ func TestFilterHTTPMethod(s *testing.T) {
t.AssertEqual(tc.expFiltered, filter(w, req))
res := w.Result()
- t.AssertEqual(tc.expAllowed, res.Header.Get("Allowed"))
+ t.AssertEqual(tc.expAllow, res.Header.Get("Allow"))
t.AssertEqual(tc.expStatusCode, res.StatusCode)
})
}