line |
true |
false |
branch |
95
|
2 |
0 |
$Dancer2::VERSION gt '0.300000' ? :
|
100
|
0 |
2 |
unless $res->is_success
|
105
|
0 |
2 |
unless ref $ret eq 'ARRAY'
|
114
|
4 |
22 |
unless $dependencies{$test}
|
115
|
11 |
25 |
unless grep {$_ eq $dep;} @provider_can
|
118
|
7 |
19 |
if @missing
|
210
|
0 |
2 |
unless cmp_deeply($logs, superbagof({'formatted', ignore(), 'level', 'debug', 'message', 'before_authenticate_user{"password":"badpwd","realm":null,"username":"dave"}'}, {'formatted', ignore(), 'level', 'debug', 'message', re(qr/Attempting.+dave.+realm config2/)}, {'formatted', ignore(), 'level', 'debug', 'message', re(qr/Attempting.+dave.+realm config3/)}, {'formatted', ignore(), 'level', 'debug', 'message', re(qr/Attempting.+dave.+realm config1/)}, {'formatted', ignore(), 'level', 'debug', 'message', 'after_authenticate_user{"errors":[],"password":"badpwd","realm":null,"success":0,"username":"dave"}'}), '... and we see expected hook output in logs and realms checked.')
|
251
|
0 |
2 |
unless cmp_deeply($logs, superbagof({'formatted', ignore(), 'level', 'debug', 'message', 'before_authenticate_user{"password":"beer","realm":"config2","username":"dave"}'}, {'formatted', ignore(), 'level', 'debug', 'message', re(qr/Attempting.+dave.+realm config2/)}, {'formatted', ignore(), 'level', 'debug', 'message', 'after_authenticate_user{"errors":[],"password":"beer","realm":null,"success":0,"username":"dave"}'}), '... and we see expected hook output in logs and realm config2 checked')
|
272
|
0 |
2 |
unless cmp_deeply($logs, noneof({'formatted', ignore(), 'level', 'debug', 'message', re(qr/Attempting.+dave.+realm config1/)}, {'formatted', ignore(), 'level', 'debug', 'message', re(qr/Attempting.+dave.+realm config3/)}), '... and the other realms were not checked.')
|
298
|
0 |
2 |
unless cmp_deeply($logs, superbagof({'formatted', ignore(), 'level', 'debug', 'message', 'before_authenticate_user{"password":"beer","realm":"config1","username":"dave"}'}, {'formatted', ignore(), 'level', 'debug', 'message', re(qr/Attempting.+dave.+realm config1/)}, {'formatted', ignore(), 'level', 'debug', 'message', re(qr/config1 accepted user dave/)}, {'formatted', ignore(), 'level', 'debug', 'message', 'after_authenticate_user{"errors":[],"password":"beer","realm":"config1","success":1,"username":"dave"}'}), '... and we see expected hook output in logs and only one realm checked')
|
324
|
0 |
2 |
unless cmp_deeply($logs, noneof({'formatted', ignore(), 'level', 'debug', 'message', re(qr/Attempting.+dave.+realm config2/)}, {'formatted', ignore(), 'level', 'debug', 'message', re(qr/Attempting.+dave.+realm config3/)}), '... and the other realms were not checked.')
|
350
|
0 |
2 |
unless cmp_deeply($logs, superbagof({'formatted', ignore(), 'level', 'debug', 'message', 'before_authenticate_user{"password":"beer","realm":null,"username":"dave"}'}, {'formatted', ignore(), 'level', 'debug', 'message', re(qr/Attempting.+dave.+realm config2/)}, {'formatted', ignore(), 'level', 'debug', 'message', re(qr/Attempting.+dave.+realm config3/)}, {'formatted', ignore(), 'level', 'debug', 'message', re(qr/Attempting.+dave.+realm config1/)}, {'formatted', ignore(), 'level', 'debug', 'message', re(qr/config1 accepted user dave/)}, {'formatted', ignore(), 'level', 'debug', 'message', 'after_authenticate_user{"errors":[],"password":"beer","realm":"config1","success":1,"username":"dave"}'}), '... and we see expected hook output in logs and 3 realms checked.')
|
396
|
0 |
2 |
unless cmp_deeply($logs, superbagof({'formatted', ignore(), 'level', 'debug', 'message', 'before_authenticate_user{"password":"whatever","realm":null,"username":"bananarepublic"}'}, {'formatted', ignore(), 'level', 'debug', 'message', re(qr/Attempting.+bananarepublic.+realm config2/)}, {'formatted', ignore(), 'level', 'debug', 'message', re(qr/Attempting.+bananarepublic.+realm config3/)}, {'formatted', ignore(), 'level', 'debug', 'message', re(qr/config3 accepted user bananarepublic/)}, {'formatted', ignore(), 'level', 'debug', 'message', 'after_authenticate_user{"errors":[],"password":"whatever","realm":"config3","success":1,"username":"bananarepublic"}'}), '... and we see expected hook output in logs and 2 realms checked')
|
427
|
0 |
2 |
unless cmp_deeply($logs, noneof({'formatted', ignore(), 'level', 'debug', 'message', re(qr/Attempting.+bananarepublic.+realm config1/)}), q[... and we don't see realm config1 checked.])
|
497
|
0 |
2 |
unless &ok(scalar $res->is_success, "/create_user newuser in realm $realm is success")
|
520
|
0 |
2 |
unless &ok(scalar $res->is_success, "/create_user newuser *again* in realm $realm is success")
|
526
|
0 |
2 |
unless cmp_deeply($logs, superbagof({'formatted', ignore(), 'level', 'debug', 'message', qq[before_create_user{"password":"pish_$realm","realm":"$realm","username":"newuser"}]}, {'formatted', ignore(), 'level', 'error', 'message', re(qr/$realm provider threw error/)}, {'formatted', ignore(), 'level', 'debug', 'message', re(qr/after_create_user,newuser,0,yes/)}), '... and we see expected before/after hook logs.')
|
553
|
0 |
2 |
unless &is(scalar $res->code, 302, 'Login with newly created user succeeds')
|
557
|
0 |
2 |
unless cmp_deeply($logs, superbagof({'formatted', ignore(), 'level', 'debug', 'message', "$realm accepted user newuser"}), '... and we see expected message in logs.')
|
587
|
0 |
1 |
unless &is(scalar $res->code, 200, '/create_user with welcome_send=>1 response is 200')
|
620
|
0 |
2 |
unless cmp_deeply($logs, superbagof({'formatted', ignore(), 'level', 'debug', 'message', 'Attempting to find user NoSuchUser in realm config2'}, {'formatted', ignore(), 'level', 'debug', 'message', 'Attempting to find user NoSuchUser in realm config3'}, {'formatted', ignore(), 'level', 'debug', 'message', 'Attempting to find user NoSuchUser in realm config1'}), '... and we see logs we expect.')
|
649
|
0 |
2 |
unless cmp_deeply($logs, superbagof({'formatted', ignore(), 'level', 'debug', 'message', 'Attempting to find user dave in realm config2'}), '... and we see logs we expect')
|
657
|
0 |
2 |
unless cmp_deeply($logs, noneof({'formatted', ignore(), 'level', 'debug', 'message', 'Attempting to find user dave in realm config3'}, {'formatted', ignore(), 'level', 'debug', 'message', 'Attempting to find user dave in realm config1'}), q[... and none of the ones we don't expect.])
|
709
|
0 |
2 |
unless cmp_deeply($logs, superbagof({'formatted', ignore(), 'level', 'error', 'message', re(qr/auth_provider needs realm or/)}), '... and correct error message is seen in logs.')
|
722
|
0 |
2 |
unless cmp_deeply($logs, superbagof({'formatted', ignore(), 'level', 'error', 'message', re(qr/Invalid realm NoSuchRealm/)}), '... and correct error message is seen in logs.')
|
732
|
0 |
2 |
unless &ok(scalar $res->is_success, 'auth_provider with good realm lives')
|
739
|
0 |
2 |
unless &is(scalar $res->code, 404, q['/foo/login' URL not matched by login route regex.])
|
768
|
1 |
1 |
if (grep {$_ eq 'get_user_by_code';} @provider_can) { }
|
823
|
0 |
2 |
unless &ok(scalar $res->is_redirect, 'GET /login whilst logged in is redirected.')
|
839
|
0 |
2 |
unless &ok(scalar $res->is_success, 'auth_provider with *no* realm lives')
|
845
|
0 |
2 |
unless &ok(scalar $res->is_redirect, 'GET /logout is_redirect')
|
871
|
0 |
2 |
unless &is($data->{'logged_in_user'}, 'dave', '... and session logged_in_user is set to dave')
|
879
|
0 |
2 |
unless &ok(scalar $res->is_redirect, 'POST /logout with return_url /foo/bar is_redirect')
|
907
|
0 |
2 |
unless &is(scalar $res->code, 302, 'Login as user with hashed password succeeds')
|
932
|
0 |
2 |
unless &is(scalar $res->code, 200, 'Can access /loggedin now we are logged in again')
|
953
|
0 |
2 |
unless &is(scalar $res->code, 302, 'Status code for login with return_url')
|
961
|
0 |
2 |
unless cmp_deeply($logs, superbagof({'formatted', ignore(), 'level', 'debug', 'message', 'config1 accepted user dave'}), '... and we see expected message in logs.')
|
981
|
0 |
2 |
unless &is(scalar $res->code, 302, 'Logging out returns 302')
|
1013
|
0 |
2 |
unless &is($data, 'none', '... and there is no logged_in_user.')
|
1030
|
0 |
2 |
unless &is($data, 'none', '... and there is no logged_in_user.')
|
1045
|
0 |
2 |
unless &is($data->{'name'}, 'David Precious', q[... and we see dave's name is David Precious.])
|
1053
|
0 |
2 |
unless &is($data->{'name'}, 'David Precious', q[... and we see dave's name is David Precious.])
|
1059
|
0 |
2 |
unless &ok(scalar $res->is_redirect, 'GET /logout is_redirect')
|
1068
|
0 |
2 |
unless &is($data, 'none', '... and there is no logged_in_user.')
|
1135
|
0 |
1 |
unless &is(scalar $res->content, 'not set', '... and logged_in_user_lastlogin returns undef')
|
1164
|
0 |
1 |
unless &ok(defined $session->{'logged_in_user_lastlogin'}, '... and logged_in_user_lastlogin is still not set in the session.')
|
1244
|
0 |
1 |
unless &ok(scalar $res->is_success, 'POST /login with password reset request is_success')
|
1247
|
0 |
1 |
unless &like(scalar $res->content, qr/A password reset request has been sent/, '... and we see "A password reset request has been sent" in page')
|
1251
|
0 |
1 |
unless &ok(!defined($Dancer2::Plugin::Auth::Extensible::Test::App::data), '... and password_reset_send_email was not called.')
|
1259
|
0 |
1 |
unless &ok(scalar $res->is_success, 'GET /login/<code> with bad code is_success')
|
1273
|
0 |
1 |
unless &ok(scalar $res->is_success, 'POST /login with password reset request is_success')
|
1276
|
0 |
1 |
unless &like(scalar $res->content, qr/A password reset request has been sent/, '... and we see "A password reset request has been sent" in page')
|
1295
|
0 |
1 |
unless &ok(scalar $res->is_success, 'GET /login/<code> with good code is_success')
|
1309
|
0 |
1 |
unless &ok(scalar $res->is_success, 'POST /login/<code> with bad code is_success')
|
1319
|
0 |
1 |
unless &ok(scalar $res->is_success, 'POST /login/<code> with good code is_success')
|
1321
|
0 |
1 |
unless &like(scalar $res->content, qr/Your new password is \w{8}\</, '... and we are given a new password.')
|
1390
|
0 |
2 |
unless &is(scalar @$logs, 1, 'One message in the logs')
|
1399
|
0 |
2 |
unless &is(scalar @$logs, 1, 'One message in the logs')
|
1421
|
0 |
2 |
unless &is(scalar $res->code, 302, '[GET /loggedin] Correct code')
|
1437
|
0 |
2 |
unless cmp_deeply($logs, superbagof({'formatted', ignore(), 'level', 'error', 'message', re(qr/user_roles needs a username or a logged in user/)}), 'got error: user_roles needs a username or a logged in user')
|
1457
|
0 |
2 |
unless &is(scalar $res->code, 302, '[GET /beer] Correct code')
|
1474
|
0 |
2 |
unless &is(scalar $res->code, 302, 'Login with real details succeeds')
|
1488
|
0 |
2 |
unless &is(scalar $res->code, 200, 'get /roles is 200')
|
1502
|
0 |
2 |
unless &is(scalar $res->code, 200, 'get /roles/bob is 200')
|
1516
|
0 |
2 |
unless &is(scalar $res->code, 200, 'We can request a route (/beer) requiring a role we have...')
|
1529
|
0 |
2 |
unless &is(scalar $res->code, 200, 'We can request a multi-role route requiring with any one role')
|
1539
|
0 |
2 |
unless &is(scalar $res->code, 200, 'We can request a multi-role route with all roles required')
|
1549
|
0 |
2 |
unless &is(scalar $res->code, 403, '/not_allroles response code 403')
|
1560
|
0 |
2 |
unless &is(scalar $res->code, 200, 'We can request a route requiring a regex role we have')
|
1572
|
0 |
2 |
unless &is(scalar $res->code, 403, q[route requiring a role we don't have gets response code 403])
|
1585
|
0 |
2 |
unless &is(scalar $res->code, 200, '/does_dave_drink_beer response is 200')
|
1593
|
0 |
2 |
unless &is(scalar $res->code, 200, '/does_dave_drink_cider response is 200')
|
1601
|
0 |
2 |
unless &is(scalar $res->code, 200, '/does_undef_drink_beer response is 200')
|
1613
|
0 |
2 |
unless &is(scalar $res->code, 302, 'Logging out returns 302')
|
1628
|
0 |
2 |
unless &is(scalar $res->code, 302, 'Status code on accessing /loggedin after logout')
|
1643
|
0 |
2 |
unless &is(scalar $res->code, 302, 'Status code on accessing /beer after logout')
|
1661
|
0 |
2 |
unless &is(scalar $res->code, 302, 'Login as user from second realm succeeds')
|
1686
|
0 |
2 |
unless &is(scalar $res->code, 200, 'Can access /loggedin now we are logged in again')
|
1695
|
0 |
2 |
unless &is(scalar $res->code, 200, 'Status code on /roles/bob/config1 route.')
|
1709
|
0 |
2 |
unless &is(scalar $res->code, 302, 'Logging out returns 302')
|
1731
|
0 |
1 |
unless &ok(scalar $res->is_success, 'get /update_current_user is_success')
|
1782
|
0 |
2 |
unless &is(scalar $res->code, 200, 'get /update_current_user is 200')
|
1789
|
0 |
2 |
unless &is(scalar $res->code, 200, "get /get_user_mark/$realm is 200")
|
1818
|
0 |
1 |
unless cmp_deeply($logs, superbagof({'formatted', ignore(), 'level', 'error', 'message', re(qr/Realm must be specified when more than one realm configured/)}), 'got log: Realm must be specified when more than one realm configured.')
|
1841
|
0 |
2 |
unless &is(scalar $res->code, 200, "get /get_user_mark/$realm is 200")
|
1857
|
0 |
2 |
unless &is(scalar $res->code, 200, "get /update_user_name/$realm is 200")
|
1864
|
0 |
2 |
unless &is(scalar $res->code, 200, "get /get_user_mark/$realm is 200")
|
1882
|
0 |
2 |
unless &like(scalar $res->content, qr/David Precious/, q[... and we see dave's details.])
|
1895
|
0 |
2 |
unless &ok(scalar $res->is_success, q[change mark's name is success])
|
1902
|
0 |
2 |
unless &ok(scalar $res->is_success, "get /get_user_mark/$realm is_success")
|
1911
|
0 |
2 |
unless &like(scalar $res->content, qr/David Precious/, q[... and we see still see dave's details.])
|
1933
|
0 |
1 |
unless &ok(scalar $res->is_success, '/user_password with valid username and password returns is_success')
|
1944
|
0 |
1 |
unless &ok(scalar $res->is_success, '/user_password with valid username and password returns is_success')
|
1955
|
0 |
1 |
unless &ok(scalar $res->is_success, '/user_password with valid username, password and realm is_success')
|
1967
|
0 |
1 |
unless &ok(scalar $res->is_success, '/user_password with valid username, password but bad realm is_success')
|
1977
|
0 |
1 |
unless &is(scalar $res->code, 302, 'Login with real details succeeds')
|
1987
|
0 |
1 |
unless &ok(scalar $res->is_success, 'user_password password=beer is_success')
|
1995
|
0 |
1 |
unless &ok(scalar $res->is_success, 'user_password password=cider is_success')
|
2011
|
0 |
1 |
unless &ok(scalar $res->is_success, 'user_password with code no user has is_success')
|
2027
|
0 |
1 |
unless &ok(scalar $res->is_success, 'user_password with code no user has is_success')
|
2038
|
0 |
1 |
unless &is(scalar $res->content, 'dave', '... and it returns the username.')
|
2046
|
0 |
1 |
unless &ok(scalar $res->is_success, 'Login with old password fails with 200 OK code')
|
2057
|
0 |
1 |
unless &is(scalar $res->code, 302, 'Login with real details succeeds')
|
2077
|
0 |
1 |
unless &ok(!$res->content, '... and it returns false.')
|
2093
|
0 |
1 |
unless &ok(scalar $res->is_success, 'Login with old password fails with 200 OK code')
|
2104
|
0 |
1 |
unless &is(scalar $res->code, 302, 'Login with real details succeeds')
|