moved tests out and into t/lib/
[catagits/Catalyst-Authentication-Credential-HTTP.git] / t / live_app.t
index e9b9ea0..05cb3a0 100644 (file)
@@ -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");