# :nodoc: all require "test/unit" require "nitro/server/cookie" include N class TC_Cookie < Test::Unit::TestCase # :nodoc: all def setup end def teardown end def test_initialize # bug: default path should be / cookie = Cookie.new("nsid", "24324234234234234") assert_equal("/", cookie.path) end def test_parse res = Cookie.parse("nsid=293230807; nauth=gmosx:meMXs0ifW7JBQ; koko=123&345") assert_equal("293230807", res["nsid"][0]) assert_equal("gmosx:meMXs0ifW7JBQ", res["nauth"][0]) assert_equal("123", res["koko"][0]) assert_equal("345", res["koko"][1]) end end