[dancer-users] Dancer::Test response_status_is cleans session data in forward

Dinis Rebolo dinisrebolo at gmail.com
Fri Jan 18 11:07:44 GMT 2013


Hi

I was building a test for a app made with dancer and I'm getting a
strange behaver...

We need to authenticate to access this routes
so I store the user in the session.

and I have something like this:

$route = 'dev';

 route_exists        [ GET => '/widgets/'.$route ],
                          "a route handler is defined for /widgets/$route";

## this works fine

response_status_is  [ GET => '/widgets/'.$route ], 302,
                       'response status is 302 for /widgets/'.$route;

### this route is a forward to '/widgets';

and after this I loose the session.

I was able to trace to where the session is lost and is in

Dancer/Test.pm line 378.

before this I have user in the session

my $get_action = Dancer::Handler::render_request($request);

after this I don't have user in the session.

Could some one help me here?
I'm using the latest Dancer version

Thanks

-- 
Dinis Rebolo
dinisrebolo at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20130118/7929b328/attachment.htm>


More information about the dancer-users mailing list