Skip to content

Commit

Permalink
test tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 12, 2013
1 parent ddcaf1a commit f609f33
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

3.85 2013-02-12
3.85 2013-02-13
- Deprecated Mojo::UserAgent->build_form_tx in favor of
Mojo::UserAgent->build_tx.
- Deprecated Mojo::UserAgent->build_json_tx in favor of
Expand Down
7 changes: 5 additions & 2 deletions t/mojo/websocket.t
Expand Up @@ -247,14 +247,17 @@ is $result, 'test3test2', 'right result';
is $client, 3, 'finish event has been emitted';

# Connection denied
$code = undef;
$code = $ws = undef;
$ua->websocket(
'/denied' => sub {
$code = pop->res->code;
my $tx = pop;
$ws = $tx->is_websocket;
$code = $tx->res->code;
$loop->stop;
}
);
$loop->start;
ok !$ws, 'not a WebSocket';
is $code, 403, 'right status';
is $handshake, 1, 'finished handshake';
is $denied, 1, 'finished websocket';
Expand Down

0 comments on commit f609f33

Please sign in to comment.