Skip to content

Commit

Permalink
test binary message in multiple frames
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 9, 2014
1 parent 91aba61 commit 0e1a85f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions t/mojolicious/websocket_lite_app.t
Expand Up @@ -132,6 +132,11 @@ $t->websocket_ok('/echo')->send_ok({binary => 'bytes!'})
->send_ok({binary => 'bytes!'})
->message_ok->message_isnt({text => 'bytes!'})->finish_ok;

# Bytes in multiple frames
$t->websocket_ok('/echo')->send_ok([0, 0, 0, 0, 2, 'a'])
->send_ok([0, 0, 0, 0, 0, 'b'])->send_ok([1, 0, 0, 0, 0, 'c'])
->message_ok->message_is({binary => 'abc'})->finish_ok;

# Zero
$t->websocket_ok('/echo')->send_ok(0)->message_ok->message_is('echo: 0')
->send_ok(0)->message_ok->message_like({text => qr/0/})->finish_ok(1000)
Expand Down

0 comments on commit 0e1a85f

Please sign in to comment.