(t *testing.T)
| 682 | } |
| 683 | |
| 684 | func TestEchoMiddlewareError(t *testing.T) { |
| 685 | e := New() |
| 686 | e.Use(func(next HandlerFunc) HandlerFunc { |
| 687 | return func(c *Context) error { |
| 688 | return errors.New("error") |
| 689 | } |
| 690 | }) |
| 691 | e.GET("/", notFoundHandler) |
| 692 | c, _ := request(http.MethodGet, "/", e) |
| 693 | assert.Equal(t, http.StatusInternalServerError, c) |
| 694 | } |
| 695 | |
| 696 | func TestEchoHandler(t *testing.T) { |
| 697 | e := New() |