spec/integration/draft76_spec.rb in em-websocket-0.3.6 vs spec/integration/draft76_spec.rb in em-websocket-0.3.7
- old
+ new
@@ -138,11 +138,11 @@
it "should handle unreasonable frame lengths by calling onerror callback" do
em {
EventMachine::WebSocket.start(:host => "0.0.0.0", :port => 12345) { |server|
server.onerror { |error|
- error.should be_an_instance_of EM::WebSocket::DataError
+ error.should be_an_instance_of EM::WebSocket::WSMessageTooBigError
error.message.should == "Frame length too long (1180591620717411303296 bytes)"
done
}
}
@@ -162,10 +162,10 @@
it "should handle impossible frames by calling onerror callback" do
em {
EventMachine::WebSocket.start(:host => "0.0.0.0", :port => 12345) { |server|
server.onerror { |error|
- error.should be_an_instance_of EM::WebSocket::DataError
+ error.should be_an_instance_of EM::WebSocket::WSProtocolError
error.message.should == "Invalid frame received"
done
}
}