Permalink
Browse files

Test also URL without trailing slash

  • Loading branch information...
1 parent d73eebe commit 5ca283c72c037126ab7136941cc84b1e24cb8c72 @imanel committed Nov 25, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 test/libwebsocket/test_url.rb
@@ -4,6 +4,12 @@ class TestURL < Test::Unit::TestCase
def test_parse
url = LibWebSocket::URL.new
+ assert url.parse('ws://example.com')
+ assert !url.secure
+ assert_equal 'example.com', url.host
+ assert_equal '/', url.resource_name
+
+ url = LibWebSocket::URL.new
assert url.parse('ws://example.com/')
assert !url.secure
assert_equal 'example.com', url.host

0 comments on commit 5ca283c

Please sign in to comment.