1
0
mirror of https://github.com/labstack/echo.git synced 2024-11-24 08:22:21 +02:00

replace GET constance with stdlib constance

This commit is contained in:
Kamandlou 2022-08-19 21:36:40 +04:30 committed by Martti T
parent d48197db7a
commit fb57d96a6d
2 changed files with 5 additions and 5 deletions

View File

@ -330,7 +330,7 @@ func TestBindUnmarshalParam(t *testing.T) {
func TestBindUnmarshalText(t *testing.T) {
e := New()
req := httptest.NewRequest(GET, "/?ts=2016-12-06T19:09:05Z&sa=one,two,three&ta=2016-12-06T19:09:05Z&ta=2016-12-06T19:09:05Z&ST=baz", nil)
req := httptest.NewRequest(http.MethodGet, "/?ts=2016-12-06T19:09:05Z&sa=one,two,three&ta=2016-12-06T19:09:05Z&ta=2016-12-06T19:09:05Z&ST=baz", nil)
rec := httptest.NewRecorder()
c := e.NewContext(req, rec)
result := struct {
@ -406,7 +406,7 @@ func TestBindUnmarshalParamAnonymousFieldPtrCustomTag(t *testing.T) {
func TestBindUnmarshalTextPtr(t *testing.T) {
e := New()
req := httptest.NewRequest(GET, "/?ts=2016-12-06T19:09:05Z", nil)
req := httptest.NewRequest(http.MethodGet, "/?ts=2016-12-06T19:09:05Z", nil)
rec := httptest.NewRecorder()
c := e.NewContext(req, rec)
result := struct {
@ -462,7 +462,7 @@ func TestBindbindData(t *testing.T) {
func TestBindParam(t *testing.T) {
e := New()
req := httptest.NewRequest(GET, "/", nil)
req := httptest.NewRequest(http.MethodGet, "/", nil)
rec := httptest.NewRecorder()
c := e.NewContext(req, rec)
c.SetPath("/users/:id/:name")

View File

@ -728,7 +728,7 @@ func TestContext_QueryString(t *testing.T) {
queryString := "query=string&var=val"
req := httptest.NewRequest(GET, "/?"+queryString, nil)
req := httptest.NewRequest(http.MethodGet, "/?"+queryString, nil)
c := e.NewContext(req, nil)
testify.Equal(t, queryString, c.QueryString())
@ -739,7 +739,7 @@ func TestContext_Request(t *testing.T) {
testify.Nil(t, c.Request())
req := httptest.NewRequest(GET, "/path", nil)
req := httptest.NewRequest(http.MethodGet, "/path", nil)
c.SetRequest(req)
testify.Equal(t, req, c.Request())