File: 10_filter.t

package info (click to toggle)
libdancer-perl 1.3202%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,408 kB
  • ctags: 638
  • sloc: perl: 7,215; xml: 1,977; sh: 51; makefile: 29; sql: 5
file content (20 lines) | stat: -rw-r--r-- 399 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use strict;
use warnings;

use Test::More import => ['!pass'], tests => 2;
use Dancer ':syntax';
use Dancer::Test;

hook before => sub {
    my $data = session;
    #warn "on a $data";
    #redirect '/nonexistent'
    #unless session || request->path =~ m{/login}sxm;
};

get '/login' => sub {
    '/login';
};

route_exists       [ GET => '/login' ];
response_status_is [ GET => '/login' ] => 200,