Skip to content

Commit 44b516b

Browse files
committed
test(router): assert the exact Allow header after removing a custom method
1 parent 65c0bf9 commit 44b516b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎router_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3164,7 +3164,7 @@ func TestDefaultRouter_RemoveCustomMethod(t *testing.T) {
31643164
rec := httptest.NewRecorder()
31653165
e.ServeHTTP(rec, httptest.NewRequest("PURGE", "/cache", nil))
31663166
assert.Equal(t, http.StatusMethodNotAllowed, rec.Code)
3167-
assert.NotContains(t, rec.Header().Get(HeaderAllow), "PURGE")
3167+
assert.Equal(t, "GET, OPTIONS", rec.Header().Get(HeaderAllow))
31683168

31693169
rec = httptest.NewRecorder()
31703170
e.ServeHTTP(rec, httptest.NewRequest("PURGE", "/purge-only", nil))

0 commit comments

Comments
 (0)