X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Controller-DBIC-API.git;a=blobdiff_plain;f=t%2Frest%2Flist.t;h=033411a8517e4891d64fa0ece83f9d3225b98ac4;hp=b63cc9894f0375c4d672bd79437de8284de39e2a;hb=a5949bfde189427d34ccd19f15d8656156454936;hpb=257cb2149dd762b4f5af045a7340197296e3e50a diff --git a/t/rest/list.t b/t/rest/list.t index b63cc98..033411a 100644 --- a/t/rest/list.t +++ b/t/rest/list.t @@ -11,10 +11,10 @@ use URI; use Test::More; use Test::WWW::Mechanize::Catalyst 'RestTest'; use HTTP::Request::Common; -use JSON; +use JSON::MaybeXS; use Data::Printer; -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' ); @@ -206,7 +206,7 @@ my $track_list_url = "$base/api/rest/track"; $response, # track does set use_json_boolean - { list => \@expected_response, success => JSON::true, totalcount => 15 }, + { list => \@expected_response, success => JSON::MaybeXS::true, totalcount => 15 }, 'correct data returned for static configured paging' ); } @@ -326,7 +326,7 @@ my $track_list_url = "$base/api/rest/track"; is_deeply( $response, # track does set use_json_boolean - { list => \@expected_response, success => JSON::true, totalcount => 2 }, + { list => \@expected_response, success => JSON::MaybeXS::true, totalcount => 2 }, 'correct data returned for -and|-or search param' ) or diag p($case) . p($response);