X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flive_app_digest.t;h=16088e0016d861960e907ab4262e2c8abcc17102;hb=eebdb0e48f5073a81e9a055e80457a8a2480e7bc;hp=c50bac2558b06b6649d510e71b2226baf1a57e65;hpb=826670f99c7d83b218b7067d4a3d3ce3e32e49a9;p=catagits%2FCatalyst-Authentication-Credential-HTTP.git diff --git a/t/live_app_digest.t b/t/live_app_digest.t index c50bac2..16088e0 100644 --- a/t/live_app_digest.t +++ b/t/live_app_digest.t @@ -6,9 +6,12 @@ BEGIN { eval { require Test::WWW::Mechanize::Catalyst } or plan skip_all => "Test::WWW::Mechanize::Catalyst is needed for this test"; - eval { require Catalyst::Plugin::Cache::FileCache } + eval { require Catalyst::Plugin::Cache } or plan skip_all => - "Catalyst::Plugin::Cache::FileCache is needed for this test"; + "Catalyst::Plugin::Cache is needed for this test"; + eval { require Cache::FileCache } + or plan skip_all => + "Cache::FileCache is needed for this test"; plan tests => 4; } use HTTP::Request; @@ -18,7 +21,7 @@ use HTTP::Request; Authentication Authentication::Store::Minimal Authentication::Credential::HTTP - Cache::FileCache + Cache /; use Test::More; our $users; @@ -27,6 +30,9 @@ use HTTP::Request; $c->authorization_required( realm => 'testrealm@host.com' ); $c->res->body( $c->user->id ); } + __PACKAGE__->config->{cache}{backend} = { + class => 'Cache::FileCache', + }; __PACKAGE__->config->{authentication}{http}{type} = 'digest'; __PACKAGE__->config->{authentication}{users} = $users = { Mufasa => { password => "Circle Of Life", }, @@ -76,3 +82,4 @@ $r->headers->push_header( Authorization => $response ); $mech->request($r); is( $mech->status, 200, "status is 200" ); $mech->content_contains( "Mufasa", "Mufasa output" ); +