(t *testing.T)
| 697 | } |
| 698 | |
| 699 | func TestRouteRawPathNoUnescape(t *testing.T) { |
| 700 | route := New() |
| 701 | route.UseRawPath = true |
| 702 | route.UnescapePathValues = false |
| 703 | |
| 704 | route.POST("/project/:name/build/:num", func(c *Context) { |
| 705 | name := c.Params.ByName("name") |
| 706 | num := c.Params.ByName("num") |
| 707 | |
| 708 | assert.Equal(t, name, c.Param("name")) |
| 709 | assert.Equal(t, num, c.Param("num")) |
| 710 | |
| 711 | assert.Equal(t, "Some%2FOther%2FProject", name) |
| 712 | assert.Equal(t, "333", num) |
| 713 | }) |
| 714 | |
| 715 | w := PerformRequest(route, http.MethodPost, "/project/Some%2FOther%2FProject/build/333") |
| 716 | assert.Equal(t, http.StatusOK, w.Code) |
| 717 | } |
| 718 | |
| 719 | func TestRouteServeErrorWithWriteHeader(t *testing.T) { |
| 720 | route := New() |
nothing calls this directly
no test coverage detected