[Catalyst-commits] r13642 - Catalyst-Authentication-Store-LDAP/trunk/t

rafl at dev.catalyst.perl.org rafl at dev.catalyst.perl.org
Mon Oct 4 23:00:14 GMT 2010


Author: rafl
Date: 2010-10-05 00:00:14 +0100 (Tue, 05 Oct 2010)
New Revision: 13642

Added:
   Catalyst-Authentication-Store-LDAP/trunk/t/06-user_autoload.t
Log:
Add failing test for ->can proxying

Added: Catalyst-Authentication-Store-LDAP/trunk/t/06-user_autoload.t
===================================================================
--- Catalyst-Authentication-Store-LDAP/trunk/t/06-user_autoload.t	                        (rev 0)
+++ Catalyst-Authentication-Store-LDAP/trunk/t/06-user_autoload.t	2010-10-04 23:00:14 UTC (rev 13642)
@@ -0,0 +1,26 @@
+use strict;
+use warnings;
+use Test::More;
+
+use Catalyst::Authentication::Store::LDAP::User;
+
+my $message = 'I exist';
+
+{
+    package TestUser;
+    use base 'Catalyst::Authentication::Store::LDAP::User';
+    sub has_attribute {
+        return unless pop eq 'exists';
+        return $message;
+    }
+}
+
+my $o = bless {}, 'TestUser';
+
+is($o->exists, $message, 'AUTOLOAD proxies ok');
+
+ok(my $meth = $o->can('exists'), 'can returns true');
+
+is($o->$meth, $message, 'can returns right coderef');
+
+done_testing;;




More information about the Catalyst-commits mailing list