Less crap in MANIFEST please
[catagits/Catalyst-Action-REST.git] / t / view.t
1 use strict;
2 use warnings;
3 use Test::More tests => 4;
4 use FindBin;
5
6 use lib ( "$FindBin::Bin/lib", "$FindBin::Bin/../lib" );
7 use Test::Rest;
8
9 use_ok 'Catalyst::Test', 'Test::Serialize';
10
11 my $t = Test::Rest->new( 'content_type' => 'text/view' );
12
13 my $monkey_template = "I am a simple view";
14 my $mres = request( $t->get( url => '/monkey_get' ) );
15 ok( $mres->is_success, 'GET the monkey succeeded' );
16 is( $mres->content, $monkey_template, "GET returned the right data" );
17
18 my $mres_post = request( $t->post( url => '/monkey_put', data => 1 ) );
19 ok( $mres_post->is_success, "POST to the monkey passed." );
20
21 1;