X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fview.t;h=07b3974581b3174840c2e2160814e8df159cb0a8;hb=3bb36dcaabf34fef5c15b1bb74c5eb198a7f5168;hp=a5a379fa6aeaff41069e0e16d10d88e68b8db407;hpb=9a76221ea1453d244e65429d3e10b5bde42d7733;p=catagits%2FCatalyst-Action-REST.git diff --git a/t/view.t b/t/view.t index a5a379f..07b3974 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 tests => 6; use FindBin; use lib ( "$FindBin::Bin/lib", "$FindBin::Bin/../lib" ); @@ -18,4 +18,10 @@ 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;