Epic cleanup and code shuffle in tests to avoid warnings
[catagits/Catalyst-Plugin-Authentication.git] / t / lib / AuthRealmTestAppCompat / Controller / Root.pm
CommitLineData
d055ce0c 1package AuthRealmTestAppCompat::Controller::Root;
2use warnings;
3use strict;
4use base qw/Catalyst::Controller/;
5
6__PACKAGE__->config( namespace => '' );
7
8use Test::More;
9use Test::Exception;
10
11sub 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
301;
31