Skip to content

Commit

Permalink
replace POST constance with stdlib constance
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamandlou authored and aldas committed Aug 20, 2022
1 parent fb57d96 commit 534bbb8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ func TestBindParam(t *testing.T) {
// Bind something with param and post data payload
body := bytes.NewBufferString(`{ "name": "Jon Snow" }`)
e2 := New()
req2 := httptest.NewRequest(POST, "/", body)
req2 := httptest.NewRequest(http.MethodPost, "/", body)
req2.Header.Set(HeaderContentType, MIMEApplicationJSON)

rec2 := httptest.NewRecorder()
Expand Down
8 changes: 4 additions & 4 deletions context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var testUser = user{1, "Jon Snow"}

func BenchmarkAllocJSONP(b *testing.B) {
e := New()
req := httptest.NewRequest(POST, "/", strings.NewReader(userJSON))
req := httptest.NewRequest(http.MethodPost, "/", strings.NewReader(userJSON))
rec := httptest.NewRecorder()
c := e.NewContext(req, rec).(*context)

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

func BenchmarkAllocJSON(b *testing.B) {
e := New()
req := httptest.NewRequest(POST, "/", strings.NewReader(userJSON))
req := httptest.NewRequest(http.MethodPost, "/", strings.NewReader(userJSON))
rec := httptest.NewRecorder()
c := e.NewContext(req, rec).(*context)

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

func BenchmarkAllocXML(b *testing.B) {
e := New()
req := httptest.NewRequest(POST, "/", strings.NewReader(userJSON))
req := httptest.NewRequest(http.MethodPost, "/", strings.NewReader(userJSON))
rec := httptest.NewRecorder()
c := e.NewContext(req, rec).(*context)

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

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

Expand Down

0 comments on commit 534bbb8

Please sign in to comment.