Version 2.008001
[catagits/Catalyst-Controller-DBIC-API.git] / t / rpc / list.t
index 6cb9794..93200a4 100644 (file)
@@ -1,5 +1,3 @@
-use 5.6.0;
-
 use strict;
 use warnings;
 
@@ -13,9 +11,9 @@ use URI;
 use Test::More;
 use Test::WWW::Mechanize::Catalyst 'RestTest';
 use HTTP::Request::Common;
-use JSON;
+use JSON::MaybeXS;
 
-my $json = JSON->new->utf8;
+my $json = JSON::MaybeXS->new(utf8 => 1);
 
 my $mech = Test::WWW::Mechanize::Catalyst->new;
 ok( my $schema = DBICTest->init_schema(), 'got schema' );
@@ -238,7 +236,7 @@ my $cd_list_url       = "$base/api/rpc/cd/list";
     is( $response->{success}, 'false', 'correct data returned' );
     like(
         $response->{messages}->[0],
-        qr/Attribute \(page\) does not pass the type constraint because: Validation failed for 'Int' (failed )?with value fgdg/,
+        qr/Attribute \(page\) does not pass the type constraint because: Validation failed for 'Int' (failed )?with value (")?fgdg(")?/,
         'correct data returned'
     );
 }
@@ -259,7 +257,7 @@ my $cd_list_url       = "$base/api/rpc/cd/list";
     is( $response->{success}, 'false', 'correct data returned' );
     like(
         $response->{messages}->[0],
-        qr/Attribute \(count\) does not pass the type constraint because: Validation failed for 'Int' (failed )?with value sdsdf/,
+        qr/Attribute \(count\) does not pass the type constraint because: Validation failed for 'Int' (failed )?with value (")?sdsdf(")?/,
         'correct data returned'
     );