From: Matt S Trout Date: Wed, 1 Sep 2010 19:19:35 +0000 (+0000) Subject: forgot the test file X-Git-Tag: v0.1400~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Authentication-Store-DBIx-Class.git;a=commitdiff_plain;h=7afa5efdbf853afd55b2857db90928ce7a6d7613 forgot the test file --- diff --git a/t/10-user-autoload.t b/t/10-user-autoload.t new file mode 100644 index 0000000..e5a8479 --- /dev/null +++ b/t/10-user-autoload.t @@ -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;