##// END OF EJS Templates
Link to watched issues list on my page....
Link to watched issues list on my page. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2457 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r2376:f70be197e0ae
r2396:5bdd4291624c
Show More
test_urinorm.rb
35 lines | 732 B | text/x-ruby | RubyLexer
require 'test/unit'
require "openid/urinorm"
require "testutil"
class URINormTestCase < Test::Unit::TestCase
include OpenID::TestDataMixin
def test_normalize
lines = read_data_file('urinorm.txt')
while lines.length > 0
case_name = lines.shift.strip
actual = lines.shift.strip
expected = lines.shift.strip
_newline = lines.shift
if expected == 'fail'
begin
OpenID::URINorm.urinorm(actual)
rescue URI::InvalidURIError
assert true
else
raise 'Should have gotten URI error'
end
else
normalized = OpenID::URINorm.urinorm(actual)
assert_equal(expected, normalized, case_name)
end
end
end
end