X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Froutes.t;h=52296eceea43ff87ad9eabb02c0dd7096a17b834;hb=5be1cb421e4f948ec38aa8ffd835296d3599c613;hp=b0d03bbc2038f96e4832eabd7031bfc5e5622cd6;hpb=35406a49a66453834477550d03bcdc3025a99afd;p=catagits%2FCatalystX-Routes.git diff --git a/t/routes.t b/t/routes.t index b0d03bb..52296ec 100644 --- a/t/routes.t +++ b/t/routes.t @@ -144,4 +144,20 @@ use HTTP::Request::Common qw( GET PUT POST DELETE ); ); } +{ + request( GET '/' ); + + is( + $MyApp1::Controller::Root::REQ{root}, 1, + 'GET request for / went to the right sub (routes work when namespace is empty string)' + ); + + request( GET '/foo.txt' ); + + is( + $MyApp1::Controller::Root::REQ{'foo.txt'}, 1, + 'GET request for /foo.txt went to the right sub (routes work when namespace is empty string)' + ); +} + done_testing();