Sha256: 600320ad715fb590b21e3502bac57932484f56557fc87f5e2f09d62ccc5ca8bb

Contents?: true

Size: 659 Bytes

Versions: 31

Compression:

Stored size: 659 Bytes

Contents

require 'test/testhelp'

class MockHttpRequest
  attr_reader :body

  def params
    return { 'REQUEST_METHOD' => 'GET'}
  end
end

class CGIWrapperTest < Test::Unit::TestCase
  
  def test_set_cookies_output_cookies
    request = MockHttpRequest.new
    response = nil # not needed for this test
    output_headers = {}
    
    cgi = Mongrel::CGIWrapper.new(request, response) 
    session = CGI::Session.new(cgi, 'database_manager' => CGI::Session::MemoryStore)
    cgi.send_cookies(output_headers)
    
    assert(output_headers.has_key?("Set-Cookie"))
    assert_equal("_session_id="+session.session_id+"; path=", output_headers["Set-Cookie"])
  end
end

Version data entries

31 entries across 31 versions & 7 rubygems

Version Path
freels-mongrel-1.1.2 test/test_cgi_wrapper.rb
headius-mongrel-1.1.6.1 test/test_cgi_wrapper.rb
phurley-mongrel-1.1.6.1 test/test_cgi_wrapper.rb
mongrel-maglev--1.1.9.0.1 test/test_cgi_wrapper.rb
merb-core-1.1.3 spec10/public/webrat/test_app/gems/gems/mongrel-1.1.5/test/test_cgi_wrapper.rb
merb-core-1.1.2 spec10/public/webrat/test_app/gems/gems/mongrel-1.1.5/test/test_cgi_wrapper.rb
merb-core-1.1.1 spec10/public/webrat/test_app/gems/gems/mongrel-1.1.5/test/test_cgi_wrapper.rb
merb-core-1.1.0 spec10/public/webrat/test_app/gems/gems/mongrel-1.1.5/test/test_cgi_wrapper.rb
mongrel-1.2.0.pre2-x86-mswin32 test/test_cgi_wrapper.rb
mongrel-1.2.0.pre2-x86-mingw32 test/test_cgi_wrapper.rb
mongrel-1.2.0.pre2 test/test_cgi_wrapper.rb
merb-core-1.1.0.rc1 spec10/public/webrat/test_app/gems/gems/mongrel-1.1.5/test/test_cgi_wrapper.rb
sho-mongrel-1.1.5 test/test_cgi_wrapper.rb
merb-core-1.1.0.pre spec10/public/webrat/test_app/gems/gems/mongrel-1.1.5/test/test_cgi_wrapper.rb
mongrel-1.0.3 test/test_cgi_wrapper.rb
mongrel-1.0.4 test/test_cgi_wrapper.rb
mongrel-1.0.2 test/test_cgi_wrapper.rb
mongrel-1.1.1 test/test_cgi_wrapper.rb
mongrel-1.1.2-java test/test_cgi_wrapper.rb
mongrel-1.1.3-java test/test_cgi_wrapper.rb