File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
lib/TestApp/Controller/Action Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,14 @@ sub run_tests {
190
190
my $action = eval $response -> content;
191
191
is_deeply $action -> attributes-> {extra_attribute }, [13];
192
192
is_deeply $action -> attributes-> {another_extra_attribute }, [' foo' ];
193
+
194
+ # Test a multi-line attribute on the action comes through as expected
195
+ is_deeply $action -> attributes-> {MultiLineAttr }, [" one\n two\n three" ];
196
+ # and a normal one e.g. `Foo('bar')`
197
+ is_deeply $action -> attributes-> {Foo }, [' bar' ];
198
+ # and one without a value, e.g. `Baz` - note that the presence of
199
+ # the arrayref shows it was there
200
+ is_deeply $action -> attributes-> {Baz }, [undef ];
193
201
}
194
202
{
195
203
ok( my $response = request(' http://localhost/action_action_nine' ),
Original file line number Diff line number Diff line change @@ -53,7 +53,11 @@ sub action_action_seven : Global : ActionClass('~TestExtraArgsAction') {
53
53
$c -> forward(' TestApp::View::Dump::Request' );
54
54
}
55
55
56
- sub action_action_eight : Global {
56
+ sub action_action_eight : Global Foo(' bar' ) MultiLineAttr(
57
+ one
58
+ two
59
+ three
60
+ ) Baz {
57
61
my ( $self , $c ) = @_ ;
58
62
$c -> forward(' TestApp::View::Dump::Action' );
59
63
}
@@ -62,4 +66,5 @@ sub action_action_nine : Global : ActionClass('~TestActionArgsFromConstructor')
62
66
my ( $self , $c ) = @_ ;
63
67
$c -> forward(' TestApp::View::Dump::Request' );
64
68
}
69
+
65
70
1;
You can’t perform that action at this time.
0 commit comments