6 use lib ( "$FindBin::Bin/lib", "$FindBin::Bin/../lib" );
9 my $t = Test::Rest->new( 'content_type' => 'text/plain' );
11 use_ok 'Catalyst::Test', 'Test::Catalyst::Action::REST';
13 my $url = '/actionsforbrowsers/for_browsers';
15 foreach my $method (qw(GET POST)) {
16 my $run_method = lc($method);
17 my $result = "something $method";
19 if ( $method eq 'GET' ) {
20 $res = request( $t->$run_method( url => $url ) );
29 ok( $res->is_success, "$method request succeeded" );
33 "$method request had proper response"
40 headers => { Accept => 'text/html' },
44 ok( $res->is_success, "GET request succeeded (client looks like browser)" );
48 "GET request had proper response (client looks like browser)"