From: John Napiorkowski Date: Wed, 25 Mar 2015 16:38:20 +0000 (-0500) Subject: test case for reported stash issue to prevent regressions X-Git-Tag: 5.90085~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=ff2b698b349ef162c5f2f4f080ca5f0091e5ba1c test case for reported stash issue to prevent regressions --- diff --git a/t/no_test_stash_bug.t b/t/no_test_stash_bug.t new file mode 100644 index 0000000..72549df --- /dev/null +++ b/t/no_test_stash_bug.t @@ -0,0 +1,28 @@ +use warnings; +use strict; + +# For reported: https://rt.cpan.org/Ticket/Display.html?id=97948 + +{ + package MyApp::Controller::Root; + $INC{'MyApp/Controller/Root.pm'} = __FILE__; + + use base 'Catalyst::Controller'; + + sub example :Local Args(0) { + pop->stash->{testing1} = 'testing2'; + } + + package MyApp; + use Catalyst; + + MyApp->setup; +} + +use Test::More; +use Catalyst::Test 'MyApp'; + +my ($res, $c) = ctx_request('/root/example'); +is $c->stash->{testing1}, 'testing2', 'got expected stash value'; + +done_testing;