Backport go/visit from 5.8 (janh), prepare for dev release
[catagits/Catalyst-Runtime.git] / t / unit_core_mvc.t
index 549d758..f641014 100644 (file)
@@ -1,4 +1,4 @@
-use Test::More tests => 44;
+use Test::More tests => 45;
 use strict;
 use warnings;
 
@@ -154,6 +154,11 @@ is ( MyApp->model , 'MyApp::Model::M', 'default_model in class method ok');
     *MyApp::Model::M::ACCEPT_CONTEXT = sub { my ($self, $c, @args) = @_; $args= \@args};
     *MyApp::View::V::ACCEPT_CONTEXT = sub { my ($self, $c, @args) = @_; $args= \@args};
 
+    # 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');
+
+
     MyApp->model('M', qw/foo bar/);
     is_deeply($args, [qw/foo bar/], '$c->model args passed to ACCEPT_CONTEXT ok');