Changeset 2288 for lang/ruby/ssb

Show
Ignore:
Timestamp:
12/02/07 16:58:42 (7 years ago)
Author:
tokuhirom
Message:

lang/ruby/ssb: fix some bugs in test suites ... omg.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/ssb/trunk/test/request_test.rb

    r2248 r2288  
    11require File.expand_path(File.dirname(__FILE__) + '/test_helper') 
    22require 'ssb/request' 
     3require 'webrick/cookie' 
    34 
    45$SAFE = 1 
     
    1516 
    1617  def cookie 
     18    ret = [] 
    1719    { 
    1820      'homepage'.taint  => 'http://example.com/'.taint, 
     
    2325      'icc'.taint       => 'icciccicc'.taint, 
    2426      'exheader'.taint  => 'X-Hoge: hoge'.taint, 
     27    }.each {|key, val| 
     28      ret.push WEBrick::Cookie.new(key, val) 
    2529    } 
     30    ret 
    2631  end 
    2732 
     
    6873    test_keys = ['homepage', 'mailaddr', 'useragent', 'uid', 'hid', 'icc'] 
    6974    test_keys.each do |key| 
    70       assert_equal(@request.term[key.to_sym].to_s, cookie[key]) 
     75      assert_equal(@request.term[key.to_sym].to_s, cookie.find {|x| x.name == key }.value ) 
    7176      assert(!@request.term[key].tainted?) 
    7277    end