Skip to content

Commit

Permalink
test connection errors too
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 2, 2017
1 parent fe8a8cc commit 18b20d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions t/mojo/websocket.t
Expand Up @@ -351,6 +351,10 @@ $result = undef;
$ua->websocket_p('/foo')->then(sub { $result = 'test failed' })
->catch(sub { $result = shift })->wait;
is $result, 'WebSocket handshake failed', 'right result';
$result = undef;
$ua->websocket_p($ua->server->url->to_abs->scheme('wsss'))
->then(sub { $result = 'test failed' })->catch(sub { $result = shift })->wait;
is $result, 'Unsupported protocol: wsss', 'right result';

# Dies
($ws, $code, $msg) = ();
Expand Down

0 comments on commit 18b20d9

Please sign in to comment.