X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Funit_core_mvc.t;h=f64101454495900da0323312dd2827a312a7be0f;hp=549d758ca68791fb7a9acdfe3ff5a0a14c512e61;hb=f9bcc1280f6685f1d937688ed9c035bc9994a01e;hpb=108201b5c403a8db7f6fa7726110b1d1b1caac1b diff --git a/t/unit_core_mvc.t b/t/unit_core_mvc.t index 549d758..f641014 100644 --- a/t/unit_core_mvc.t +++ b/t/unit_core_mvc.t @@ -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');