X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Controller-DBIC-API.git;a=blobdiff_plain;f=t%2Frest%2Fcreate.t;h=06d3b59878788a68247e0d0477360fb3e2159b9b;hp=eff1bfaf97243736026ae0bb9bcbf31694208b30;hb=be23c445e84d879534218be5470e57eed3df9448;hpb=7f3ed65229c15d978fd4ac17848947da0a454369 diff --git a/t/rest/create.t b/t/rest/create.t index eff1bfa..06d3b59 100644 --- a/t/rest/create.t +++ b/t/rest/create.t @@ -10,9 +10,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' ); @@ -138,7 +138,7 @@ my $track_create_url = "$base/api/rest/track"; is( $rs->count, 3, 'no records created' ); my $response = $json->decode( $mech->content ); - is( $response->{success}, JSON::false, + is( $response->{success}, JSON::MaybeXS::false, 'success property returns unquoted false' ); like( $response->{messages}->[0],