3 use Test::More tests => 4;
6 use Data::Dump qw(dump);
8 use lib ( "$FindBin::Bin/lib", "$FindBin::Bin/../lib" );
12 use_ok 'Catalyst::Test', 'Test::Serialize';
15 my $has_serializer = eval "require YAML::Syck";
17 skip "YAML::Syck not available", 3, unless $has_serializer;
19 my $t = Test::Rest->new( 'content_type' => 'text/html' );
22 "<html><title>Test::Serialize</title><body><pre>--- \nmonkey: likes chicken!\n</pre></body></html>";
23 my $mres = request( $t->get( url => '/monkey_get' ) );
24 ok( $mres->is_success, 'GET the monkey succeeded' );
25 is( $mres->content, $monkey_template, "GET returned the right data" );
27 my $post_data = { 'sushi' => 'is good for monkey', };
29 request( $t->post( url => '/monkey_put', data => Dump($post_data) ) );
30 ok( $mres_post->is_error, "POST to the monkey failed; no deserializer." );