X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Action-Serialize-Data-Serializer.git;a=blobdiff_plain;f=t%2Fyaml.t;fp=t%2Fyaml.t;h=0000000000000000000000000000000000000000;hp=3c5a557012507323edfedd6690a3a31dbca6c194;hb=79025f72c27ba313b3c701cee238f84166f32f9e;hpb=f10c7e1c7eb3b4cb10401dbb86ca8db3dc38ced2 diff --git a/t/yaml.t b/t/yaml.t deleted file mode 100644 index 3c5a557..0000000 --- a/t/yaml.t +++ /dev/null @@ -1,36 +0,0 @@ -use strict; -use warnings; -use Test::More; -use FindBin; - -use lib ("$FindBin::Bin/lib", "$FindBin::Bin/../lib"); -use Test::Rest; - -use_ok 'Catalyst::Test', 'Test::Serialize'; - -# Should use the default serializer, YAML -my $t = Test::Rest->new('content_type' => 'text/x-yaml'); - -my $has_serializer = eval "require YAML::Syck"; -SKIP: { - skip "YAML::Syck not available", 4, unless $has_serializer; - - # We should use the default serializer, YAML - my $monkey_template = { - monkey => 'likes chicken!', - }; - my $mres = request($t->get(url => '/monkey_get')); - ok( $mres->is_success, 'GET the monkey succeeded' ); - is_deeply(YAML::Syck::Load($mres->content), $monkey_template, "GET returned the right data"); - - my $post_data = { - 'sushi' => 'is good for monkey', - }; - my $mres_post = request($t->post(url => '/monkey_put', data => YAML::Syck::Dump($post_data))); - ok( $mres_post->is_success, "POST to the monkey succeeded"); - is_deeply($mres_post->content, "is good for monkey", "POST data matches"); -}; - -1; - -done_testing;