expand ParamParser comment so nobody breaks it again
[catagits/Web-Simple.git] / t / sub-dispatch-args.t
index 8812595..71fc4eb 100644 (file)
@@ -34,6 +34,7 @@ use Plack::Test;
     sub show_landing {
         my ($self, @args) = @_;
         local $self->{_dispatcher};
+        local $args[-1]->{'Web::Dispatch.original_env'};
         return [
             200, ['Content-Type' => 'application/perl' ],
             [::Dumper \@args],
@@ -42,6 +43,7 @@ use Plack::Test;
     sub show_users {
         my ($self, @args) = @_;
         local $self->{_dispatcher};
+        local $args[-1]->{'Web::Dispatch.original_env'};
         return [
             200, ['Content-Type' => 'application/perl' ],
             [::Dumper \@args],
@@ -50,6 +52,7 @@ use Plack::Test;
     sub show_user {
         my ($self, @args) = @_;
         local $self->{_dispatcher};
+        local $args[-1]->{'Web::Dispatch.original_env'};
         return [
             200, ['Content-Type' => 'application/perl' ],
             [::Dumper \@args],
@@ -58,6 +61,7 @@ use Plack::Test;
     sub process_post {
         my ($self, @args) = @_;
         local $self->{_dispatcher};
+        local $args[-1]->{'Web::Dispatch.original_env'};
         return [
             200, ['Content-Type' => 'application/perl' ],
             [::Dumper \@args],
@@ -73,7 +77,7 @@ sub run_request { $app->run_test_request(@_); }
 ok my $get_landing = run_request(GET => 'http://localhost/' ),
   'got landing';
 
-cmp_ok $get_landing->code, '==', 200, 
+cmp_ok $get_landing->code, '==', 200,
   '200 on GET';
 
 no strict 'refs';
@@ -89,7 +93,7 @@ no strict 'refs';
 ok my $get_users = run_request(GET => 'http://localhost/user'),
   'got user';
 
-cmp_ok $get_users->code, '==', 200, 
+cmp_ok $get_users->code, '==', 200,
   '200 on GET';
 
 {
@@ -102,7 +106,7 @@ cmp_ok $get_users->code, '==', 200,
 ok my $get_user = run_request(GET => 'http://localhost/user/42'),
   'got user';
 
-cmp_ok $get_user->code, '==', 200, 
+cmp_ok $get_user->code, '==', 200,
   '200 on GET';
 
 {
@@ -115,7 +119,7 @@ cmp_ok $get_user->code, '==', 200,
 ok my $post_user = run_request(POST => 'http://localhost/user/42', [id => '99'] ),
   'post user';
 
-cmp_ok $post_user->code, '==', 200, 
+cmp_ok $post_user->code, '==', 200,
   '200 on POST';
 
 {
@@ -126,4 +130,3 @@ cmp_ok $post_user->code, '==', 200,
     is $params->{id}, 99, 'got expected value for id';
     is ref($env), 'HASH', 'Got hashref';
 }
-