X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Froutes.t;h=fc2557b0d43de7dd8fa46e2920a633b7bf035faf;hb=ffc588239001d163a5c27429a48ac4637bdf37dd;hp=15d03687936b6c95e4f13a49585c4d7cc3cc7e53;hpb=77d62699ced7fd0493e9932f30c9bac5d8e913c4;p=catagits%2FCatalystX-Routes.git diff --git a/t/routes.t b/t/routes.t index 15d0368..fc2557b 100644 --- a/t/routes.t +++ b/t/routes.t @@ -8,24 +8,14 @@ use Catalyst::Test 'MyApp1'; use HTTP::Request::Common qw( GET PUT POST DELETE ); { - request( - GET '/foo', - [ - Accept => 'application/json', - ] - ); + request( GET '/foo', ( Accept => 'application/json' ) ); is( $MyApp1::Controller::C1::REQ{get}, 1, 'GET request for /foo went to the right sub' ); - request( - GET '/foo', - [ - Accept => '*/*', - ] - ); + request( GET '/foo', ( Accept => '*/*', ) ); is( $MyApp1::Controller::C1::REQ{get_html}, 1, @@ -55,44 +45,39 @@ use HTTP::Request::Common qw( GET PUT POST DELETE ); } { - get('c1/bar'); + request( GET '/c1/bar', ( Accept => 'application/json' ) ); is( $MyApp1::Controller::C1::REQ{get}, 2, - 'GET request for c1/bar went to the right sub' + 'GET request for /c1/bar went to the right sub' ); - request( - GET 'c1/bar', - [ - Accept => '*/*', - ] - ); + request( GET '/c1/bar', ( Accept => '*/*', ) ); is( $MyApp1::Controller::C1::REQ{get_html}, 2, - 'GET request for c1/bar that looks like a browser went to the right sub' + 'GET request for /c1/bar that looks like a browser went to the right sub' ); - request( POST 'c1/bar' ); + request( POST '/c1/bar' ); is( $MyApp1::Controller::C1::REQ{post}, 2, - 'POST request for c1/bar went to the right sub' + 'POST request for /c1/bar went to the right sub' ); - request( PUT 'c1/bar' ); + request( PUT '/c1/bar' ); is( $MyApp1::Controller::C1::REQ{put}, 2, - 'PUT request for c1/bar went to the right sub' + 'PUT request for /c1/bar went to the right sub' ); - request( DELETE 'c1/bar' ); + request( DELETE '/c1/bar' ); is( $MyApp1::Controller::C1::REQ{delete}, 2, - 'DELETE request for c1/bar went to the right sub' + 'DELETE request for /c1/bar went to the right sub' ); }