X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Controller-DBIC-API.git;a=blobdiff_plain;f=t%2Frest%2Fitem.t;h=dbc5e60b61aff38a6d29b3702916ddbd9dedef72;hp=3b075aa936bf20f512c470ab328050999769ecac;hb=68e022911bf388167a3c92aa392e77dd46578cda;hpb=28eb7216907fc0c29f9fa58d88b24fd80e2d21d0 diff --git a/t/rest/item.t b/t/rest/item.t index 3b075aa..dbc5e60 100644 --- a/t/rest/item.t +++ b/t/rest/item.t @@ -70,4 +70,17 @@ my $track_view_url = "$base/api/rest/track/"; ); } +{ + my $req = + GET( $artist_view_url . 'action_with_error', undef, 'Accept' => 'application/json' ); + $mech->request($req); + cmp_ok( $mech->status, '==', 404, 'action returned error 404' ); + my $response = $json->decode( $mech->content ); + is_deeply( + $response, + { success => 'false' }, + 'correct data returned' + ); +} + done_testing();