Move test apps out into test files, fixes tests as predicted
[catagits/Catalyst-Authentication-Credential-HTTP.git] / t / lib / AuthTestApp.pm
1 package AuthTestApp;
2 use Catalyst qw/
3   Authentication
4   Authentication::Store::Minimal
5   Authentication::Credential::HTTP
6   /;
7 use Test::More;
8 our $users;
9 sub moose : Local {
10     my ( $self, $c ) = @_;
11     $c->authorization_required;
12     $c->res->body( $c->user->id );
13 }
14 __PACKAGE__->config->{authentication}{http}{type} = 'basic';
15 __PACKAGE__->config->{authentication}{users} = $users = {
16     foo => { password         => "s3cr3t", },
17 };
18 __PACKAGE__->setup;
19