X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Fevil_stash.t;fp=t%2Fevil_stash.t;h=e97a131f1786ed2992d99a36c5640df4b86e9d8c;hp=0000000000000000000000000000000000000000;hb=be57189a849e35a77232113c0f4523009d865a78;hpb=d7325e05db00f4eff6b1520368c9c2bda5ab931c diff --git a/t/evil_stash.t b/t/evil_stash.t new file mode 100644 index 0000000..e97a131 --- /dev/null +++ b/t/evil_stash.t @@ -0,0 +1,37 @@ +use warnings; +use strict; +use Test::More; + +{ + package MyApp::Controller::Root; + $INC{'MyApp/Controller/Root.pm'} = __FILE__; + + use base 'Catalyst::Controller'; + + sub root :Path('') Args(0) { + my ($self, $c) = @_; + $c->{stash}->{foo} = 'bar'; + $c->stash(baz=>'boor'); + $c->{stash}->{baz} = $c->stash->{baz} . 2; + + Test::More::is($c->stash->{foo}, 'bar'); + Test::More::is($c->stash->{baz}, 'boor2'); + Test::More::is($c->{stash}->{foo}, 'bar'); + Test::More::is($c->{stash}->{baz}, 'boor2'); + + $c->res->body('return'); + } + + package MyApp; + use Catalyst; + MyApp->setup; +} + +use HTTP::Request::Common; +use Catalyst::Test 'MyApp'; + +{ + ok my $res = request POST 'root/'; +} + +done_testing();