Adjust to not munge config
[catagits/CatalystX-DynamicComponent.git] / t / 04_dynamicmodel.t
CommitLineData
7d26c84b 1use strict;
2use warnings;
f5cb8a51 3use Test::More tests => 6;
7d26c84b 4
104abdae 5use FindBin qw/$Bin/;
6use lib "$Bin/lib";
7
7d26c84b 8use DynamicAppDemo;
9
10# Naughty, should make an app instance.
11my $model = DynamicAppDemo->model('One');
12
13ok $model;
14isa_ok $model, 'SomeModelClass';
3765b9ee 15is_deeply $model->say_hello({name => 'world'}), { type => 'say_hello_response', body => 'Hello world' };
7d26c84b 16
f5cb8a51 17ok(DynamicAppDemo->model('Two'), 'Have model Two');
18
19ok(!DynamicAppDemo->model('Three'), 'No model Three');
20
21ok(!DynamicAppDemo->model('Four'), 'No model Four');
22