fix typo and update test
[catagits/Catalyst-Runtime.git] / t / arg_constraints.t
index 5e3a235..20ff1ba 100644 (file)
@@ -22,6 +22,9 @@ use HTTP::Request::Common;
     $c->res->body('many_ints');
   }
 
+  sub int_priority :Path('priority_test') Args(Int) { $_[1]->res->body('int_priority') }
+  sub any_priority :Path('priority_test') Args(1) { $_[1]->res->body('any_priority') }
+
   sub default :Default {
     my ($self, $c, $int) = @_;
     $c->res->body('default');
@@ -32,6 +35,7 @@ use HTTP::Request::Common;
   package MyApp;
   use Catalyst;
 
+  #MyApp->config(show_internal_actions => 1);
   MyApp->setup;
 }
 
@@ -67,5 +71,14 @@ use Catalyst::Test 'MyApp';
   is $res->content, 'default';
 }
 
+{
+  my $res = request '/priority_test/1';
+  is $res->content, 'int_priority';
+}
+{
+  my $res = request '/priority_test/a';
+  is $res->content, 'any_priority';
+}
+
 done_testing;