Epic cleanup and code shuffle in tests to avoid warnings
[catagits/Catalyst-Plugin-Authentication.git] / t / lib / AuthRealmTestAppProgressive.pm
CommitLineData
714e2bdc 1package AuthRealmTestAppProgressive;
2use warnings;
3use strict;
d055ce0c 4use base qw/Catalyst/;
714e2bdc 5
6### using A::Store::minimal with new style realms
7### makes the app blow up, since c::p::a::s::minimal
8### isa c:a::s::minimal, and it's compat setup() gets
9### run, with an unexpected config has (realms on top,
10### not users). This tests makes sure the app no longer
11### blows up when this happens.
12use Catalyst qw/
13 Authentication
14 Authentication::Store::Minimal
15/;
16
714e2bdc 17our %members = (
18 'members' => {
19 bob => { password => "s00p3r" }
20 },
21 'other' => {
22 sally => { password => "s00p3r" }
23 },
24);
25
d055ce0c 26__PACKAGE__->config('Plugin::Authentication' => {
714e2bdc 27 default_realm => 'progressive',
28 progressive => {
29 class => 'Progressive',
30 realms => [ 'other', 'members' ],
31 },
32 other => {
33 credential => {
34 class => 'Password',
35 password_field => 'password',
36 password_type => 'clear'
37 },
38 store => {
39 class => 'Minimal',
40 users => $members{other},
41 }
42 },
43 members => {
44 credential => {
45 class => 'Password',
46 password_field => 'password',
47 password_type => 'clear'
48 },
49 store => {
50 class => 'Minimal',
51 users => $members{members},
52 }
53 },
d055ce0c 54});
714e2bdc 55
56__PACKAGE__->setup;
57
d055ce0c 581;
59