refactor into umbrella test application
[catagits/Catalyst-Action-REST.git] / t / catalyst-action-deserialize.t
index ca08fa4..f4de577 100644 (file)
@@ -11,18 +11,19 @@ use Test::Rest;
 # Should use Data::Dumper, via Data::Serializer 
 my $t = Test::Rest->new('content_type' => 'text/x-yaml');
 
-use_ok 'Catalyst::Test', 'Test::Catalyst::Action::Deserialize';
+use_ok 'Catalyst::Test', 'Test::Catalyst::Action::REST';
+my $url = '/deserialize/test';
 
-my $res = request($t->put( url => '/test', data => Dump({ kitty => "LouLou" })));
+my $res = request($t->put( url => $url, data => Dump({ kitty => "LouLou" })));
 ok( $res->is_success, 'PUT Deserialize request succeeded' );
 is( $res->content, "LouLou", "Request returned deserialized data");
 
 my $nt = Test::Rest->new('content_type' => 'text/broken');
-my $bres = request($nt->put( url => '/test', data => Dump({ kitty => "LouLou" })));
+my $bres = request($nt->put( url => $url, data => Dump({ kitty => "LouLou" })));
 is( $bres->code, 415, 'PUT on un-useable Deserialize class returns 415');
 
 my $ut = Test::Rest->new('content_type' => 'text/not-happening');
-my $ures = request($ut->put( url => '/test', data => Dump({ kitty => "LouLou" })));
+my $ures = request($ut->put( url => $url, data => Dump({ kitty => "LouLou" })));
 is ($bres->code, 415, 'GET on unknown Content-Type returns 415');
 
 1;