7 $Data::Dumper::Maxdepth=1;
9 use lib "$FindBin::Bin/../lib";
11 use Test::More tests => 13;
12 use Catalyst::Test 'TestApp';
15 my ($response, $actions, $msg) = @_;
16 my $expected = join ", ",
17 (map { "TestApp::Controller::Attributes->$_" } @$actions),
18 'TestApp::Controller::Root->end';
19 is( $response->header('x-catalyst-executed') => $expected,
20 $msg//'Executed correct acitons');
23 ok( my $response = request('http://localhost/attributes/view'),
24 'get /attributes/view' );
25 ok( !$response->is_success, 'Response Unsuccessful' );
27 ok( $response = request('http://localhost/attributes/foo'),
28 "get /attributes/foo" );
29 ok_actions($response => ['foo']);
31 ok( $response = request('http://localhost/attributes/all_attrs'),
32 "get /attributes/all_attrs" );
33 ok( $response->is_success, "Response OK" );
34 ok_actions($response => [qw/fetch all_attrs_action/]);
36 ok( $response = request('http://localhost/attributes/some_attrs'),
37 "get /attributes/some_attrs" );
38 ok( $response->is_success, "Response OK" );
39 ok_actions($response => [qw/fetch some_attrs_action/]);
41 ok( $response = request('http://localhost/attributes/one_attr'),
42 "get /attributes/one_attr" );
43 ok( $response->is_success, "Response OK" );
44 ok_actions($response => [qw/fetch one_attr_action/]);