X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fview.t;h=f82af4b95ffc2aa466d5d1788816c201ae70a20f;hb=19cd07ecf000cd9fe5652c1a171e1a942902d20c;hp=a5a379fa6aeaff41069e0e16d10d88e68b8db407;hpb=9a76221ea1453d244e65429d3e10b5bde42d7733;p=catagits%2FCatalyst-Action-REST.git diff --git a/t/view.t b/t/view.t index a5a379f..f82af4b 100644 --- a/t/view.t +++ b/t/view.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More; use FindBin; use lib ( "$FindBin::Bin/lib", "$FindBin::Bin/../lib" ); @@ -18,4 +18,12 @@ is( $mres->content, $monkey_template, "GET returned the right data" ); my $mres_post = request( $t->post( url => '/monkey_put', data => 1 ) ); ok( $mres_post->is_success, "POST to the monkey passed." ); +my $t2 = Test::Rest->new( 'content_type' => 'text/explodingview' ); +my $res = request( $t2->get( url => '/monkey_get' ) ); + +ok (! $res->is_success, 'View errors result in failure'); +like( $res->content, qr/don't know how/, 'The error looks okay'); + 1; + +done_testing;