Version 1.07
[catagits/Catalyst-Action-Serialize-Data-Serializer.git] / t / jsonp.t
index 70f9b18..f5b884a 100644 (file)
--- a/t/jsonp.t
+++ b/t/jsonp.t
@@ -10,7 +10,6 @@ use utf8;
 eval 'use JSON 2.12';
 plan skip_all => 'Install JSON 2.12 or later to run this test' if ($@);
 
-plan tests => 7;
 
 use_ok 'Catalyst::Test', 'Test::Serialize', 'Catalyst::Action::Serialize::JSON';
 
@@ -20,11 +19,13 @@ 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=omnivore'));
+    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 =~ /^omnivore\((.*)?\);$/;
+    my ($json_param) = $mres->content =~ /^My_Animal.omnivore\((.*)?\);$/;
     is_deeply($json->decode($json_param), $monkey_template, "GET returned the right data");
 }
 
 1;
+
+done_testing;