Version 1.017
[catagits/Catalyst-Authentication-Store-LDAP.git] / t / 06-user_autoload.t
CommitLineData
17cead9e 1use strict;
2use warnings;
3use Test::More;
4
5use Catalyst::Authentication::Store::LDAP::User;
6
7my $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
18my $o = bless {}, 'TestUser';
19
20is($o->exists, $message, 'AUTOLOAD proxies ok');
21
22ok(my $meth = $o->can('exists'), 'can returns true');
23
24is($o->$meth, $message, 'can returns right coderef');
25
e385da71 26done_testing;