X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=t%2F8_auth_00_base.t;h=4b5cbfdef5b23d9c7311b2deaa081a40ea3c93a8;hb=d710d6cd21be21c0ab2df3566c2bd61d9015cac6;hp=90e6e519d131b2d16e5cd2e2e8955420f6761e7f;hpb=4eee158dce82376f2f37de29d91c53f60a24aebe;p=chaz%2Fp5-CGI-Ex diff --git a/t/8_auth_00_base.t b/t/8_auth_00_base.t index 90e6e51..4b5cbfd 100644 --- a/t/8_auth_00_base.t +++ b/t/8_auth_00_base.t @@ -7,7 +7,7 @@ =cut use strict; -use Test::More tests => 33; +use Test::More tests => 35; use_ok('CGI::Ex::Auth'); @@ -24,6 +24,7 @@ use_ok('CGI::Ex::Auth'); sub script_name { $0 } sub no_cookie_verify { 1 } sub secure_hash_keys { ['aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'bbbbbbbbbbbbbbbbbbbbbbbbbbb', 'ccc'] } + sub failed_sleep { 0 } } { @@ -32,7 +33,7 @@ use_ok('CGI::Ex::Auth'); use vars qw($crypt); BEGIN { $crypt = crypt('123qwe', 'SS') }; sub use_crypt { 1 } - sub get_pass_by_user { $crypt } + sub get_pass_by_user { {password => $crypt, foobar => 'baz'} } } my $token = Auth->new->generate_token({user => 'test', real_pass => '123qwe', use_base64 => 1}); @@ -96,6 +97,11 @@ ok(! $Auth::set_cookie, "Set_cookie was not called"); ok($Auth::deleted_cookie, "deleted_cookie was not called"); +my $auth = Aut2->get_valid_auth({form => {%$form_good3}}); +my $data = $auth->last_auth_data; +ok($auth && $data, "Aut2 worked again"); +ok($data->{'foobar'} eq 'baz', 'And it contained the correct value'); + SKIP: { skip("Crypt::Blowfish not found", 4) if ! eval { require Crypt::Blowfish };