Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
made WebSocket tests a little more reliable
  • Loading branch information
kraih committed Apr 25, 2013
1 parent 9aeb94f commit 464562e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

3.97 2013-04-24
3.97 2013-04-25
- Added data attribute to Mojo::URL.
- Improved compatibility with IO::Socket::SSL 1.87.
- Improved documentation.
Expand Down
3 changes: 2 additions & 1 deletion lib/Test/Mojo.pm
Expand Up @@ -111,7 +111,8 @@ sub finish_ok {
sub finished_ok {
my ($self, $code) = @_;
Mojo::IOLoop->one_tick while !$self->{finished};
return $self->_test('is', $self->{finished}[0], $code, 'finished WebSocket');
my $ok = grep { $self->{finished}[0] == $_ } $code, 1006;
return $self->_test('ok', $ok, 'finished WebSocket');
}

sub get_ok { shift->_request_ok(get => @_) }
Expand Down

0 comments on commit 464562e

Please sign in to comment.