Commit | Line | Data |
d055ce0c |
1 | package AuthRealmTestAppCompat::Controller::Root; |
2 | use warnings; |
3 | use strict; |
4 | use base qw/Catalyst::Controller/; |
5 | |
6 | __PACKAGE__->config( namespace => '' ); |
7 | |
8 | use Test::More; |
9 | use Test::Exception; |
10 | |
11 | sub moose : Local { |
12 | my ( $self, $c ) = @_; |
13 | |
14 | while ( my ($user, $info) = each %$AuthRealmTestAppCompat::members ) { |
15 | |
16 | my $ok = eval { |
17 | $c->authenticate( |
18 | { username => $user, password => $info->{password} }, |
19 | 'members' |
20 | ), |
21 | }; |
22 | |
23 | ok( !$@, "Test did not die: $@" ); |
24 | ok( $ok, "user $user authentication" ); |
25 | } |
26 | |
27 | $c->res->body( "ok" ); |
28 | } |
29 | |
30 | 1; |
31 | |