X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Action-Serialize-Data-Serializer.git;a=blobdiff_plain;f=t%2Fjsonp.t;fp=t%2Fjsonp.t;h=0000000000000000000000000000000000000000;hp=f5b884a286f4301629c6c9a6bdc8ccc60ec51508;hb=79025f72c27ba313b3c701cee238f84166f32f9e;hpb=f10c7e1c7eb3b4cb10401dbb86ca8db3dc38ced2 diff --git a/t/jsonp.t b/t/jsonp.t deleted file mode 100644 index f5b884a..0000000 --- a/t/jsonp.t +++ /dev/null @@ -1,31 +0,0 @@ -use strict; -use warnings; -use Test::More; -use FindBin; - -use lib ("$FindBin::Bin/lib", "$FindBin::Bin/../lib"); -use Test::Rest; -use utf8; - -eval 'use JSON 2.12'; -plan skip_all => 'Install JSON 2.12 or later to run this test' if ($@); - - -use_ok 'Catalyst::Test', 'Test::Serialize', 'Catalyst::Action::Serialize::JSON'; - -my $json = JSON->new->utf8; - -for ('text/javascript','application/x-javascript','application/javascript') { - my $t = Test::Rest->new('content_type' => $_); - my $monkey_template = { monkey => 'likes chicken!' }; - - my $mres = request($t->get(url => '/monkey_get?callback=My_Animal.omnivore')); - ok( $mres->is_success, 'GET the monkey succeeded' ); - - my ($json_param) = $mres->content =~ /^My_Animal.omnivore\((.*)?\);$/; - is_deeply($json->decode($json_param), $monkey_template, "GET returned the right data"); -} - -1; - -done_testing;