(t *testing.T)
| 1843 | } |
| 1844 | |
| 1845 | func TestMuxMatch_HasBasePath(t *testing.T) { |
| 1846 | r := NewRouter() |
| 1847 | r.Get("/", func(w http.ResponseWriter, r *http.Request) { |
| 1848 | w.Header().Set("X-Test", "yes") |
| 1849 | w.Write([]byte("")) |
| 1850 | }) |
| 1851 | |
| 1852 | tctx := NewRouteContext() |
| 1853 | |
| 1854 | tctx.Reset() |
| 1855 | if r.Match(tctx, "GET", "/") != true { |
| 1856 | t.Fatal("expecting to find match for route:", "GET", "/") |
| 1857 | } |
| 1858 | } |
| 1859 | |
| 1860 | func TestMuxMatch_DoesNotHaveBasePath(t *testing.T) { |
| 1861 | r := NewRouter() |