Skip to content

Instantly share code, notes, and snippets.

@taiyoh
Created May 26, 2009 07:24
Show Gist options
  • Save taiyoh/117938 to your computer and use it in GitHub Desktop.
Save taiyoh/117938 to your computer and use it in GitHub Desktop.
append test for ark-perl/t/004_forward.t
diff --git a/t/004_forward.t b/t/004_forward.t
index 3130ffa..21f8bb8 100644
--- a/t/004_forward.t
+++ b/t/004_forward.t
@@ -42,6 +42,16 @@ use Test::Base;
my ($self, $c) = @_;
$c->res->{body} .= 'six_';
}
+
+ sub seven : Local {
+ my ( $self, $c ) = @_;
+ $c->forward( 'eight', 'seven_' );
+ }
+
+ sub eight : Local {
+ my ( $self, $c, $seven ) = @_;
+ $c->res->{body} .= "${seven}eight_";
+ }
}
use Ark::Test 'TestApp',
@@ -55,3 +65,9 @@ plan 'no_plan';
is( $res->content, 'one_two_tree_four_five_six_', 'forward ok');
}
+{
+ my $res = request( GET => '/root/seven' );
+ ok( $res->is_success, 'request ok');
+ is( $res->content, 'seven_eight_', 'forward ok');
+}
+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment