X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flive_app.t;h=05cb3a05716de2c00174964dc0dee1aea4cdb77c;hb=861c2f44050dc2e9e4388353d5939ad8008b3a5a;hp=e9b9ea0eeded9baab2f46c57e14fcc50eee2403e;hpb=40918fd153c5228b2dc37c53c8c04617018b35a0;p=catagits%2FCatalyst-Authentication-Credential-HTTP.git diff --git a/t/live_app.t b/t/live_app.t index e9b9ea0..05cb3a0 100644 --- a/t/live_app.t +++ b/t/live_app.t @@ -9,43 +9,8 @@ BEGIN { plan tests => 4; } use HTTP::Request; -{ - package AuthTestApp; - use Catalyst qw/ - Authentication - /; - use Test::More; - our %users; - __PACKAGE__->config(authentication => { - default_realm => 'test', - realms => { - test => { - store => { - class => 'Minimal', - users => \%users, - }, - credential => { - class => 'HTTP', - type => 'basic', - password_type => 'clear', - password_field => 'password' - }, - }, - }, - }); - sub auto : Private { - my ($self, $c) = @_; - $c->authenticate(); - } - sub moose : Local { - my ( $self, $c ) = @_; - $c->res->body( $c->user->id ); - } - %users = ( - foo => { password => "s3cr3t", }, - ); - __PACKAGE__->setup; -} + +use Test::More; use Test::WWW::Mechanize::Catalyst qw/AuthTestApp/; my $mech = Test::WWW::Mechanize::Catalyst->new; $mech->get("http://localhost/moose");