Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added a few more WebSocket tests
  • Loading branch information
kraih committed Sep 17, 2011
1 parent f95097e commit 373c4e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/Test/Mojo.pm
Expand Up @@ -661,6 +661,8 @@ Reset user agent session.
$t = $t->send_message_ok('hello');
$t = $t->send_message_ok('hello', 'sent successfully');
$t = $t->send_message_ok([$bytes]);
$t = $t->send_message_ok([$bytes], 'sent successfully');
Send C<WebSocket> message.
Note that this method is EXPERIMENTAL and might change without warning!
Expand Down
6 changes: 5 additions & 1 deletion t/mojolicious/websocket_lite_app.t
Expand Up @@ -11,7 +11,7 @@ BEGIN {

# "Oh, dear. She’s stuck in an infinite loop and he’s an idiot.
# Well, that’s love for you."
use Test::More tests => 59;
use Test::More tests => 65;

# "Your mistletoe is no match for my *tow* missile."
use Mojo::ByteStream 'b';
Expand Down Expand Up @@ -120,3 +120,7 @@ $t->websocket_ok('/unicode')->send_message_ok('hello again')
my $bytes = b("I ♥ Mojolicious")->encode('UTF-16LE')->to_string;
$t->websocket_ok('/bytes')->send_message_ok([$bytes])->message_is($bytes)
->finish_ok;

# WebSocket /bytes (multiple times)
$t->websocket_ok('/bytes')->send_message_ok([$bytes])->message_is($bytes)
->send_message_ok([$bytes])->message_is($bytes)->finish_ok;

0 comments on commit 373c4e2

Please sign in to comment.