Fix tests to skip if YAML::Syck is not installed
[catagits/Catalyst-Action-REST.git] / t / catalyst-action-serialize-query.t
1 use strict;
2 use warnings;
3 use Test::More;
4 use Test::Requires qw(YAML::Syck);
5 use FindBin;
6
7 use lib ("$FindBin::Bin/lib", "$FindBin::Bin/../lib", "$FindBin::Bin/broken");
8 use Test::Rest;
9
10 # YAML 
11 my $t = Test::Rest->new('content_type' => 'text/x-yaml');
12
13 use_ok 'Catalyst::Test', 'Test::Catalyst::Action::REST';
14
15 my $req = $t->get(url => '/serialize/test?content-type=text/x-yaml');
16 $req->remove_header('Content-Type');
17 my $res = request($req);
18 ok( $res->is_success, 'GET the serialized request succeeded' );
19 my $data = <<EOH;
20 --- 
21 lou: is my cat
22 EOH
23 is( $res->content, $data, "Request returned proper data");
24
25 1;
26
27 done_testing;