Fix ACCEPT_CONTEXT on MyApp
[catagits/Catalyst-Runtime.git] / t / unit_core_mvc.t
index f77e263..0953e2c 100644 (file)
@@ -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/], 'MyApp->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');
 
@@ -168,7 +173,5 @@ is ( MyApp->model , 'MyApp::Model::M', 'default_model in class method ok');
     $c->view('::View::V', qw/foo3 bar3/);
     is_deeply($args, [qw/foo3 bar3/], 'args passed to ACCEPT_CONTEXT ok');
 
-    undef $args;
-    MyApp->model('M', qw/foo bar/);
-    is($args, undef, 'MyApp->model does not invoke ACCEPT_CONTEXT');
+
 }