X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Funit%2Fcore%2Fmvc.t;fp=t%2Funit%2Fcore%2Fmvc.t;h=f96002b30e00123b5ec41f20d0fb736c09f2be8e;hb=af3ff00e4738b2e87d189e79fd12739315711ab3;hp=0000000000000000000000000000000000000000;hpb=9fa3cc8bde162dc2ff77745b60c3a5a371360add;p=catagits%2FCatalyst-Runtime.git diff --git a/t/unit/core/mvc.t b/t/unit/core/mvc.t new file mode 100644 index 0000000..f96002b --- /dev/null +++ b/t/unit/core/mvc.t @@ -0,0 +1,31 @@ +use Test::More tests => 7; +use strict; +use warnings; + +use_ok('Catalyst'); + +my @complist = + map { "MyApp::$_"; } + qw/C::Controller M::Model V::View Controller::C Model::M View::V/; + +{ + + package MyApp; + + use base qw/Catalyst/; + + __PACKAGE__->components( { map { ( $_, $_ ) } @complist } ); +} + +is( MyApp->view('View'), 'MyApp::V::View', 'V::View ok' ); + +is( MyApp->controller('Controller'), + 'MyApp::C::Controller', 'C::Controller ok' ); + +is( MyApp->model('Model'), 'MyApp::M::Model', 'M::Model ok' ); + +is( MyApp->view('V'), 'MyApp::View::V', 'View::V ok' ); + +is( MyApp->controller('C'), 'MyApp::Controller::C', 'Controller::C ok' ); + +is( MyApp->model('M'), 'MyApp::Model::M', 'Model::M ok' );