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 {
190190 my $action = eval $response -> content;
191191 is_deeply $action -> attributes-> {extra_attribute }, [13];
192192 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 ];
193201 }
194202 {
195203 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') {
5353 $c -> forward(' TestApp::View::Dump::Request' );
5454}
5555
56- sub action_action_eight : Global {
56+ sub action_action_eight : Global Foo(' bar' ) MultiLineAttr(
57+ one
58+ two
59+ three
60+ ) Baz {
5761 my ( $self , $c ) = @_ ;
5862 $c -> forward(' TestApp::View::Dump::Action' );
5963}
@@ -62,4 +66,5 @@ sub action_action_nine : Global : ActionClass('~TestActionArgsFromConstructor')
6266 my ( $self , $c ) = @_ ;
6367 $c -> forward(' TestApp::View::Dump::Request' );
6468}
69+
65701;
You can’t perform that action at this time.
0 commit comments