48274a5f8e238f5a1b471d20c64f40d4dac22c5c
[catagits/CatalystX-DynamicComponent.git] / t / 04_dynamicmodel.t
1 use strict;
2 use warnings;
3 use Test::More tests => 6;
4
5 use FindBin qw/$Bin/;
6 use lib "$Bin/lib";
7
8 use DynamicAppDemo;
9
10 # Naughty, should make an app instance.
11 my $model = DynamicAppDemo->model('One');
12
13 ok $model;
14 isa_ok $model, 'SomeModelClass';
15 is $model->say_hello('world'), 'Hello world';
16
17 ok(DynamicAppDemo->model('Two'), 'Have model Two');
18
19 ok(!DynamicAppDemo->model('Three'), 'No model Three');
20
21 ok(!DynamicAppDemo->model('Four'), 'No model Four');
22