aboutsummaryrefslogtreecommitdiff
path: root/header_regression_test.go
diff options
context:
space:
mode:
authorGravatar Maxim Lebedev <toby3d@yandex.com> 2019-05-06 20:54:49 +0500
committerGravatar Erik Dubbelboer <erik@dubbelboer.com> 2019-05-06 17:54:49 +0200
commitf544170d6384e251aa6657e55bac36c999c86e7a (patch)
treee55dc8af183dfe5e22a2191f96460ab75282a019 /header_regression_test.go
parentTiming fixes (#564) (diff)
downloadfasthttp-f544170d6384e251aa6657e55bac36c999c86e7a.tar.gz
fasthttp-f544170d6384e251aa6657e55bac36c999c86e7a.tar.bz2
fasthttp-f544170d6384e251aa6657e55bac36c999c86e7a.zip
Added methods constants (#567)
* :sparkles: Added methods constants * :ok_hand: Fixed methods comment due to review changes
Diffstat (limited to 'header_regression_test.go')
-rw-r--r--header_regression_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/header_regression_test.go b/header_regression_test.go
index 69a5775..ea2615c 100644
--- a/header_regression_test.go
+++ b/header_regression_test.go
@@ -41,10 +41,10 @@ func TestIssue28ResponseWithoutBodyNoContentType(t *testing.T) {
}
func TestIssue6RequestHeaderSetContentType(t *testing.T) {
- testIssue6RequestHeaderSetContentType(t, "GET")
- testIssue6RequestHeaderSetContentType(t, "POST")
- testIssue6RequestHeaderSetContentType(t, "PUT")
- testIssue6RequestHeaderSetContentType(t, "PATCH")
+ testIssue6RequestHeaderSetContentType(t, MethodGet)
+ testIssue6RequestHeaderSetContentType(t, MethodPost)
+ testIssue6RequestHeaderSetContentType(t, MethodPut)
+ testIssue6RequestHeaderSetContentType(t, MethodPatch)
}
func testIssue6RequestHeaderSetContentType(t *testing.T, method string) {
@@ -77,7 +77,7 @@ func issue6VerifyRequestHeader(t *testing.T, h *RequestHeader, contentType strin
if string(h.Method()) != method {
t.Fatalf("unexpected method: %q. Expecting %q", h.Method(), method)
}
- if method != "GET" {
+ if method != MethodGet {
if h.ContentLength() != contentLength {
t.Fatalf("unexpected content-length: %d. Expecting %d. method=%q", h.ContentLength(), contentLength, method)
}