Sha256: 6dd303ba24a1d40f86dac9b10669a593a4a10867f795709b171cbd7796fae93f

Contents?: true

Size: 598 Bytes

Versions: 5

Compression:

Stored size: 598 Bytes

Contents

# :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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
nitro-0.4.1 test/n/server/tc_cookie.rb
nitro-0.5.0 test/nitro/server/tc_cookie.rb
nitro-0.6.0 test/nitro/server/tc_cookie.rb
nitro-0.7.0 test/nitro/server/tc_cookie.rb
nitro-0.8.0 test/nitro/server/tc_cookie.rb