spec/support/all_client_drafts.rb in websocket-1.0.0 vs spec/support/all_client_drafts.rb in websocket-1.0.1
- old
+ new
@@ -39,9 +39,30 @@
it "should return valid port" do
@request_params = { :port => 123 }
handshake.port.should eql(123)
end
+ it "should parse uri" do
+ @request_params = { :uri => "ws://test.example.org:301/test_path?query=true" }
+ handshake.host.should eql('test.example.org')
+ handshake.port.should eql(301)
+ handshake.path.should eql('/test_path')
+ handshake.query.should eql('query=true')
+ end
+
+ it "should parse url" do
+ @request_params = { :url => "ws://test.example.org:301/test_path?query=true" }
+ handshake.host.should eql('test.example.org')
+ handshake.port.should eql(301)
+ handshake.path.should eql('/test_path')
+ handshake.query.should eql('query=true')
+ end
+
+ it "should resolve correct path with root server provided" do
+ @request_params = { :url => "ws://test.example.org" }
+ handshake.path.should eql('/')
+ end
+
it "should return valid response" do
validate_request
end
it "should allow custom path" do