| 773 | } |
| 774 | |
| 775 | func TestEchoDelete(t *testing.T) { |
| 776 | e := New() |
| 777 | |
| 778 | ri := e.DELETE("/", func(c *Context) error { |
| 779 | return c.String(http.StatusTeapot, "OK") |
| 780 | }) |
| 781 | |
| 782 | assert.Equal(t, http.MethodDelete, ri.Method) |
| 783 | assert.Equal(t, "/", ri.Path) |
| 784 | assert.Equal(t, http.MethodDelete+":/", ri.Name) |
| 785 | assert.Nil(t, ri.Parameters) |
| 786 | |
| 787 | status, body := request(http.MethodDelete, "/", e) |
| 788 | assert.Equal(t, http.StatusTeapot, status) |
| 789 | assert.Equal(t, "OK", body) |
| 790 | } |
| 791 | |
| 792 | func TestEchoGet(t *testing.T) { |
| 793 | e := New() |