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