X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Action-Serialize-Data-Serializer.git;a=blobdiff_plain;f=t%2Fcatalyst-action-rest-action-dispatch-for-browsers.t;fp=t%2Fcatalyst-action-rest-action-dispatch-for-browsers.t;h=0000000000000000000000000000000000000000;hp=c309ae7b9a389fb243018c69599ef68681a5fe47;hb=79025f72c27ba313b3c701cee238f84166f32f9e;hpb=f10c7e1c7eb3b4cb10401dbb86ca8db3dc38ced2 diff --git a/t/catalyst-action-rest-action-dispatch-for-browsers.t b/t/catalyst-action-rest-action-dispatch-for-browsers.t deleted file mode 100644 index c309ae7..0000000 --- a/t/catalyst-action-rest-action-dispatch-for-browsers.t +++ /dev/null @@ -1,52 +0,0 @@ -use strict; -use warnings; -use Test::More; -use FindBin; - -use lib ( "$FindBin::Bin/lib", "$FindBin::Bin/../lib" ); -use Test::Rest; - -my $t = Test::Rest->new( 'content_type' => 'text/plain' ); - -use_ok 'Catalyst::Test', 'Test::Catalyst::Action::REST'; - -my $url = '/actionsforbrowsers/for_browsers'; - -foreach my $method (qw(GET POST)) { - my $run_method = lc($method); - my $result = "something $method"; - my $res; - if ( $method eq 'GET' ) { - $res = request( $t->$run_method( url => $url ) ); - } else { - $res = request( - $t->$run_method( - url => $url, - data => '', - ) - ); - } - ok( $res->is_success, "$method request succeeded" ); - is( - $res->content, - "$method", - "$method request had proper response" - ); -} - -my $res = request( - $t->get( - url => $url, - headers => { Accept => 'text/html' }, - ) -); - -ok( $res->is_success, "GET request succeeded (client looks like browser)" ); -is( - $res->content, - "GET_html", - "GET request had proper response (client looks like browser)" -); - -done_testing; -