add test for calling ACCEPT_CONTEXT with class
Marcus Ramberg [Thu, 27 Nov 2008 23:39:31 +0000 (23:39 +0000)]
t/unit_core_mvc.t

index f77e263..6d1c7fc 100644 (file)
@@ -1,4 +1,4 @@
-use Test::More tests => 45;
+use Test::More tests => 46;
 use strict;
 use warnings;
 
@@ -158,6 +158,11 @@ is ( MyApp->model , 'MyApp::Model::M', 'default_model in class method ok');
 
     my $c = bless {}, 'MyApp';
 
+    # test accept-context with class rather than instance
+    MyApp->model('M', qw/foo bar/);
+    is_deeply($args, [qw/foo bar/], '$c->model args passed to ACCEPT_CONTEXT ok');
+
+
     $c->model('M', qw/foo bar/);
     is_deeply($args, [qw/foo bar/], '$c->model args passed to ACCEPT_CONTEXT ok');