Make tests use strict and warnings. Cleanup the killing of activemq so that it happen...
[catagits/Catalyst-Engine-STOMP.git] / t / 04-message-driven-request.t
CommitLineData
40e96678 1use strict;
2use warnings;
8edb2b46 3use Test::More tests => 5;
40e96678 4
5use FindBin;
6use lib "$FindBin::Bin/../testapp/lib";
7
8edb2b46 8BEGIN {
9 use_ok 'Catalyst::Test::MessageDriven', 'StompTestApp' or die;
10};
40e96678 11
0e4b5a7d 12# successful request - type is minimum attributes
40e96678 13my $req = "---\ntype: ping\n";
14my $res = request('testcontroller', $req);
15ok($res, 'response to ping message');
16ok($res->is_success, 'successful response');
0e4b5a7d 17
18# unsuccessful empty request - no type
19$req = "--- ~\n";
20$res = request('testcontroller', $req);
21ok($res, 'response to empty message');
22ok($res->is_error, 'unsuccessful response');
edb41ed1 23