mirror of
https://github.com/labstack/echo.git
synced 2025-01-12 01:22:21 +02:00
replace POST constance with stdlib constance
This commit is contained in:
parent
fb57d96a6d
commit
534bbb81e3
@ -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()
|
||||
|
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user