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=0953e2cb338de4c5fe63ab2f346d31f1a8a1bd6e;hp=f6b9011548c95173c15d7d117b6984b145a98b14;hb=8abaac85ce28cc1e3fa5d8f56c7b1f71213ac5b3;hpb=15a32cd53bc6ab00aa2e70f214486483278145e9 diff --git a/t/unit_core_mvc.t b/t/unit_core_mvc.t index f6b9011..0953e2c 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; @@ -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'); @@ -167,4 +172,6 @@ is ( MyApp->model , 'MyApp::Model::M', 'default_model in class method ok'); # regexp fallback $c->view('::View::V', qw/foo3 bar3/); is_deeply($args, [qw/foo3 bar3/], 'args passed to ACCEPT_CONTEXT ok'); + + }