Skip to content

Commit 534bbb8

Browse files
Kamandloualdas
authored andcommitted
replace POST constance with stdlib constance
1 parent fb57d96 commit 534bbb8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

bind_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ func TestBindParam(t *testing.T) {
492492
// Bind something with param and post data payload
493493
body := bytes.NewBufferString(`{ "name": "Jon Snow" }`)
494494
e2 := New()
495-
req2 := httptest.NewRequest(POST, "/", body)
495+
req2 := httptest.NewRequest(http.MethodPost, "/", body)
496496
req2.Header.Set(HeaderContentType, MIMEApplicationJSON)
497497

498498
rec2 := httptest.NewRecorder()

context_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var testUser = user{1, "Jon Snow"}
3232

3333
func BenchmarkAllocJSONP(b *testing.B) {
3434
e := New()
35-
req := httptest.NewRequest(POST, "/", strings.NewReader(userJSON))
35+
req := httptest.NewRequest(http.MethodPost, "/", strings.NewReader(userJSON))
3636
rec := httptest.NewRecorder()
3737
c := e.NewContext(req, rec).(*context)
3838

@@ -46,7 +46,7 @@ func BenchmarkAllocJSONP(b *testing.B) {
4646

4747
func BenchmarkAllocJSON(b *testing.B) {
4848
e := New()
49-
req := httptest.NewRequest(POST, "/", strings.NewReader(userJSON))
49+
req := httptest.NewRequest(http.MethodPost, "/", strings.NewReader(userJSON))
5050
rec := httptest.NewRecorder()
5151
c := e.NewContext(req, rec).(*context)
5252

@@ -60,7 +60,7 @@ func BenchmarkAllocJSON(b *testing.B) {
6060

6161
func BenchmarkAllocXML(b *testing.B) {
6262
e := New()
63-
req := httptest.NewRequest(POST, "/", strings.NewReader(userJSON))
63+
req := httptest.NewRequest(http.MethodPost, "/", strings.NewReader(userJSON))
6464
rec := httptest.NewRecorder()
6565
c := e.NewContext(req, rec).(*context)
6666

@@ -849,7 +849,7 @@ func TestContext_IsWebSocket(t *testing.T) {
849849

850850
func TestContext_Bind(t *testing.T) {
851851
e := New()
852-
req := httptest.NewRequest(POST, "/", strings.NewReader(userJSON))
852+
req := httptest.NewRequest(http.MethodPost, "/", strings.NewReader(userJSON))
853853
c := e.NewContext(req, nil)
854854
u := new(user)
855855

0 commit comments

Comments
 (0)