Commit | Line | Data |
d5c074b5 |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use FindBin qw/$Bin/; |
5 | use lib "$Bin/lib"; |
6 | |
7 | use Moose::Util qw/does_role/; |
8 | |
83c57636 |
9 | use Test::More tests => 6; |
d5c074b5 |
10 | |
11 | use DynamicAppDemo; |
12 | |
13 | # Naughty, should make an app instance. |
14 | my $controller = DynamicAppDemo->controller('One'); |
15 | |
16 | ok $controller; |
1bbef1e7 |
17 | isa_ok $controller, 'DynamicAppDemo::ControllerBase'; |
279c014c |
18 | ok $controller->can('method_from_controller_role'), 'Role appears applied'; |
19 | |
d5c074b5 |
20 | ok ! $controller->action_for('get_reflected_action_methods'), |
21 | 'not leaking actions'; |
22 | |
279c014c |
23 | ok ! $controller->action_for('method_from_controller_role'), |
24 | 'not leaking actions'; |
279c014c |
25 | |
83c57636 |
26 | ok $controller->action_for('say_hello'), |
27 | 'Am finding generated actions'; |
28 | |