Writing tests for restricted parts of Dancer application
27 May
2012
27 May
'12
2:38 p.m.
Hello. What are the proper way to write tests for parts of Dancer application which are acceptable after user logged in? I.e., for example: ---- hook 'before' => sub { if ( !session('username') and request->path !~ qr{^/login} ) { redirect '/login'; } }; get '/login' => sub { # appropriate template }; post '/login' => sub { # set up session('username') }; get '/auth_only' => sub { ... } ---- How can I write tests for '/auth_only'? -- Anatoly
4912
Age (days ago)
4912
Last active (days ago)
0 comments
1 participants
participants (1)
-
Anatoly Bashmakov