Commit | Line | Data |
17cead9e |
1 | use strict; |
2 | use warnings; |
3 | use Test::More; |
4 | |
5 | use Catalyst::Authentication::Store::LDAP::User; |
6 | |
7 | my $message = 'I exist'; |
8 | |
9 | { |
10 | package TestUser; |
11 | use base 'Catalyst::Authentication::Store::LDAP::User'; |
12 | sub has_attribute { |
13 | return unless pop eq 'exists'; |
14 | return $message; |
15 | } |
16 | } |
17 | |
18 | my $o = bless {}, 'TestUser'; |
19 | |
20 | is($o->exists, $message, 'AUTOLOAD proxies ok'); |
21 | |
22 | ok(my $meth = $o->can('exists'), 'can returns true'); |
23 | |
24 | is($o->$meth, $message, 'can returns right coderef'); |
25 | |
e385da71 |
26 | done_testing; |