X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Controller-DBIC-API.git;a=blobdiff_plain;f=t%2Frpc%2Fupdate.t;h=2e36a6dd3e2f49bd6256de220e30bac4f2d70029;hp=9a3075699a9b7f25ae235706094ba8b52f31619e;hb=HEAD;hpb=a5bf6db237f004118bb8743ac941458946b21473 diff --git a/t/rpc/update.t b/t/rpc/update.t index 9a30756..2e36a6d 100644 --- a/t/rpc/update.t +++ b/t/rpc/update.t @@ -11,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' ); @@ -28,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' } );