Fixing Makefile.PL, RT#42859
[catagits/Catalyst-Action-REST.git] / t / catalyst-action-rest.t
index 8534732..5ace007 100644 (file)
@@ -81,6 +81,15 @@ sub not_implemented_not_implemented {
     $c->forward('ok');
 }
 
+sub not_modified : Local : ActionClass('REST') { }
+
+sub not_modified_GET {
+    my ( $self, $c ) = @_;
+    $c->res->status(304);
+    return 1;
+}
+
+
 sub ok : Private {
     my ( $self, $c ) = @_;
 
@@ -135,6 +144,9 @@ is( $options_res->code, 200, "OPTIONS request handler succeeded" );
 is( $options_res->header('allow'),
     "GET", "OPTIONS request allow header properly set." );
 
+my $modified_res = request( $t->get( url => '/not_modified' ) );
+is( $modified_res->code, 304, "Not Modified request handler succeeded" );
+
 my $ni_res = request( $t->delete( url => '/not_implemented' ) );
 is( $ni_res->code, 200, "Custom not_implemented handler succeeded" );
 is(