Handle "no type" in messages better - attempt to reply saying so.
[catagits/Catalyst-Engine-STOMP.git] / t / 04-message-driven-request.t
CommitLineData
40e96678 1use strict;
2use warnings;
0e4b5a7d 3use Test::More tests => 5;
40e96678 4
5use FindBin;
6use lib "$FindBin::Bin/../testapp/lib";
7
8BEGIN { use_ok 'Catalyst::Test::MessageDriven', 'StompTestApp' };
9
0e4b5a7d 10# successful request - type is minimum attributes
40e96678 11my $req = "---\ntype: ping\n";
12my $res = request('testcontroller', $req);
13ok($res, 'response to ping message');
14ok($res->is_success, 'successful response');
0e4b5a7d 15
16# unsuccessful empty request - no type
17$req = "--- ~\n";
18$res = request('testcontroller', $req);
19ok($res, 'response to empty message');
20ok($res->is_error, 'unsuccessful response');