~ubuntu-branches/ubuntu/trusty/ruby1.9/trusty

« back to all changes in this revision

Viewing changes to test/webrick/test_cookie.rb

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2006-05-08 22:23:12 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060508222312-w2wqeaz030ifi59j
Tags: 1.9.0+20060423-3ubuntu1
* Resynchronized with Debian.
* Only change from Debian is the addition of
  debian/patches/903_sparc_fix_define.patch to fix illegal instructions
  at runtime on sparc. (change from 1.9.0+20050921-1ubuntu1)

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
    assert_equal("__div__session", cookies[1].name)
54
54
    assert_equal("9865ecfd514be7f7", cookies[1].value)
55
55
  end
 
56
 
 
57
  def test_parse_set_cookie
 
58
    data = %(Customer="WILE_E_COYOTE"; Version="1"; Path="/acme")
 
59
    cookie = WEBrick::Cookie.parse_set_cookie(data)
 
60
    assert_equal("Customer", cookie.name)
 
61
    assert_equal("WILE_E_COYOTE", cookie.value)
 
62
    assert_equal(1, cookie.version)
 
63
    assert_equal("/acme", cookie.path)
 
64
    
 
65
    data = %(Shipping="FedEx"; Version="1"; Path="/acme"; Secure)
 
66
    cookie = WEBrick::Cookie.parse_set_cookie(data)
 
67
    assert_equal("Shipping", cookie.name)
 
68
    assert_equal("FedEx", cookie.value)
 
69
    assert_equal(1, cookie.version)
 
70
    assert_equal("/acme", cookie.path)
 
71
    assert_equal(true, cookie.secure)
 
72
  end
56
73
end