use Dist::Zilla::PluginBundle::Git
[catagits/Catalyst-Controller-DBIC-API.git] / t / rpc / update.t
index 29dbf9d..2e36a6d 100644 (file)
@@ -1,5 +1,3 @@
-use 5.6.0;
-
 use strict;
 use warnings;
 
@@ -13,9 +11,9 @@ use DBICTest;
 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' );
@@ -30,6 +28,7 @@ my $tracks_update_url = "$base/api/rpc/track/update";
 
 # test invalid track id caught
 {
+    diag 'DBIx::Class warns about a non-numeric id which is ok because we test for that too';
     foreach my $wrong_id ( 'sdsdsdsd', 3434234 ) {
         my $incorrect_url = "$base/api/rpc/track/id/" . $wrong_id . "/update";
         my $req = POST( $incorrect_url, { title => 'value' } );