X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fbackend_md5.t;h=61a5fbb528a5c4a77a5bdce71796f9a935dcf216;hb=02dbbc739aaec1e36b31d63c4dd5ec2df9eebc83;hp=34c6e2ce605bf21f608c41b311b92699c22c2565;hpb=e517ed3d8c939c232d895d45b66085a6573be39e;p=catagits%2FCatalyst-Authentication-Store-Htpasswd.git diff --git a/t/backend_md5.t b/t/backend_md5.t index 34c6e2c..61a5fbb 100644 --- a/t/backend_md5.t +++ b/t/backend_md5.t @@ -11,25 +11,21 @@ BEGIN { plan tests => 12; } -use Path::Class; - use File::Temp qw/tempfile/; my $m; BEGIN { use_ok($m = "Catalyst::Plugin::Authentication::Store::Htpasswd::Backend") } (undef, my $tmp) = tempfile(); -my $passwd = Apache::Htpasswd->new({ passwdFile => "$tmp", UseMD5 => 1 }); - -$passwd->htpasswd("user", "s3cr3t"); +my $passwd = Authen::Htpasswd->new($tmp, { encrypt_hash => 'md5' }); +$passwd->add_user("user", "s3cr3t"); can_ok($m, "new"); isa_ok(my $o = $m->new( $passwd ), $m); can_ok($m, "file"); -isa_ok( $o->file, "Apache::Htpasswd"); - +isa_ok( $o->file, "Authen::Htpasswd"); can_ok( $m, "user_supports"); ok( $m->user_supports(qw/password self_check/), "user_supports self check" );