X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=t%2F8_auth_00_base.t;h=4b5cbfdef5b23d9c7311b2deaa081a40ea3c93a8;hb=d710d6cd21be21c0ab2df3566c2bd61d9015cac6;hp=c47492c3c8d7be119a9a5f2ac6b73ffad3ff7dda;hpb=d2b7c937e86e6e8c4b4193e9f4a8da075919b4fd;p=chaz%2Fp5-CGI-Ex diff --git a/t/8_auth_00_base.t b/t/8_auth_00_base.t index c47492c..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'); @@ -33,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}); @@ -97,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 };