X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fview.t;fp=t%2Fview.t;h=a5a379fa6aeaff41069e0e16d10d88e68b8db407;hb=9a76221ea1453d244e65429d3e10b5bde42d7733;hp=0000000000000000000000000000000000000000;hpb=51cc8fe9230a36356a847ee2e443f47f3e390873;p=catagits%2FCatalyst-Action-REST.git diff --git a/t/view.t b/t/view.t new file mode 100644 index 0000000..a5a379f --- /dev/null +++ b/t/view.t @@ -0,0 +1,21 @@ +use strict; +use warnings; +use Test::More tests => 4; +use FindBin; + +use lib ( "$FindBin::Bin/lib", "$FindBin::Bin/../lib" ); +use Test::Rest; + +use_ok 'Catalyst::Test', 'Test::Serialize'; + +my $t = Test::Rest->new( 'content_type' => 'text/view' ); + +my $monkey_template = "I am a simple view"; +my $mres = request( $t->get( url => '/monkey_get' ) ); +ok( $mres->is_success, 'GET the monkey succeeded' ); +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." ); + +1;