test/test_http_cookie.rb in http-cookie-1.0.0.pre2 vs test/test_http_cookie.rb in http-cookie-1.0.0.pre3
- old
+ new
@@ -160,10 +160,11 @@
cookie = HTTP::Cookie.parse(cookie_str, :origin => url).first
assert_equal 'example.com', cookie.domain
assert cookie.for_domain?
+ assert_equal '.example.com', cookie.dot_domain
end
def test_parse_domain_no_dot
url = URI.parse('http://host.example.com/')
@@ -171,10 +172,11 @@
cookie = HTTP::Cookie.parse(cookie_str, :origin => url).first
assert_equal 'example.com', cookie.domain
assert cookie.for_domain?
+ assert_equal '.example.com', cookie.dot_domain
end
def test_parse_domain_none
url = URI.parse('http://example.com/')
@@ -182,9 +184,10 @@
cookie = HTTP::Cookie.parse(cookie_str, :origin => url).first
assert_equal 'example.com', cookie.domain
assert !cookie.for_domain?
+ assert_equal 'example.com', cookie.dot_domain
end
def test_parse_max_age
url = URI.parse('http://localhost/')