[Catalyst-commits] r13568 - Catalyst-Authentication-Store-DBIx-Class/trunk/t

matthewt at dev.catalyst.perl.org matthewt at dev.catalyst.perl.org
Wed Sep 1 19:19:35 GMT 2010


Author: matthewt
Date: 2010-09-01 20:19:35 +0100 (Wed, 01 Sep 2010)
New Revision: 13568

Added:
   Catalyst-Authentication-Store-DBIx-Class/trunk/t/10-user-autoload.t
Log:
forgot the test file

Added: Catalyst-Authentication-Store-DBIx-Class/trunk/t/10-user-autoload.t
===================================================================
--- Catalyst-Authentication-Store-DBIx-Class/trunk/t/10-user-autoload.t	                        (rev 0)
+++ Catalyst-Authentication-Store-DBIx-Class/trunk/t/10-user-autoload.t	2010-09-01 19:19:35 UTC (rev 13568)
@@ -0,0 +1,26 @@
+use strict;
+use warnings;
+use Test::More;
+use Catalyst::Authentication::Store::DBIx::Class::User;
+
+my $message = 'I exist';
+
+{
+  package My::Test;
+
+  sub exists { $message }
+}
+
+my $o = bless({
+  _user => bless({}, 'My::Test'),
+}, 'Catalyst::Authentication::Store::DBIx::Class::User');
+
+is($o->exists, $message, 'AUTOLOAD proxies ok');
+
+ok(my $meth = $o->can('exists'), 'can returns true');
+
+::Dwarn $meth;
+
+is($o->$meth, $message, 'can returns right coderef');
+
+done_testing;




More information about the Catalyst-commits mailing list