(t *testing.T)
| 678 | } |
| 679 | |
| 680 | func TestRouteRawPath(t *testing.T) { |
| 681 | route := New() |
| 682 | route.UseRawPath = true |
| 683 | |
| 684 | route.POST("/project/:name/build/:num", func(c *Context) { |
| 685 | name := c.Params.ByName("name") |
| 686 | num := c.Params.ByName("num") |
| 687 | |
| 688 | assert.Equal(t, name, c.Param("name")) |
| 689 | assert.Equal(t, num, c.Param("num")) |
| 690 | |
| 691 | assert.Equal(t, "Some/Other/Project", name) |
| 692 | assert.Equal(t, "222", num) |
| 693 | }) |
| 694 | |
| 695 | w := PerformRequest(route, http.MethodPost, "/project/Some%2FOther%2FProject/build/222") |
| 696 | assert.Equal(t, http.StatusOK, w.Code) |
| 697 | } |
| 698 | |
| 699 | func TestRouteRawPathNoUnescape(t *testing.T) { |
| 700 | route := New() |
nothing calls this directly
no test coverage detected