5 use Catalyst::Authentication::Store::DBIx::Class::User;
7 my $message = 'I exist';
12 sub exists { $message }
15 my $class = 'Catalyst::Authentication::Store::DBIx::Class::User';
17 _user => bless({}, 'My::Test'),
20 is($o->exists, $message, 'AUTOLOAD proxies ok');
22 ok(my $meth = $o->can('exists'), 'can returns true');
24 is($o->$meth, $message, 'can returns right coderef');
26 is($o->can('non_existent_method'), undef, 'can on non existent method returns undef');
28 is($o->non_existent_method, undef, 'AUTOLOAD traps non existent method');
31 is($class->can('non_existent_method'), undef, "can on non existent class method");
34 fail('can on non existent class method');
35 diag("Got exception: $e");
39 is($class->non_existent_method, undef, 'AUTOLOAD traps non existent class method');
42 fail('AUTOLOAD traps non existent class method');
43 diag("Got exception: $e");