3 use Test::More tests => 21;
6 use lib ( "$FindBin::Bin/lib", "$FindBin::Bin/../lib" );
9 # Should use the default serializer, YAML
10 my $t = Test::Rest->new( 'content_type' => 'text/plain' );
12 use_ok 'Catalyst::Test', 'Test::Catalyst::Action::REST';
14 foreach my $method (qw(GET DELETE POST PUT OPTIONS)) {
15 my $run_method = lc($method);
17 if ( grep /$method/, qw(GET DELETE OPTIONS) ) {
18 $res = request( $t->$run_method( url => '/actions/test' ) );
22 url => '/actions/test',
27 ok( $res->is_success, "$method request succeeded" );
31 "$method request had proper response"
34 $res->header('X-Was-In-TopLevel'),
36 "went through top level action for dispatching to $method"
39 $res->header('Using-Action'),
41 "went through action for dispatching to $method"