scm: subversion: simplify Ruby 1.9 string test in unit model test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5159 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
4923ff76fa
commit
b404ba776f
@ -143,17 +143,13 @@ class RepositorySubversionTest < ActiveSupport::TestCase
|
|||||||
s1 = "\xC2\x80"
|
s1 = "\xC2\x80"
|
||||||
s2 = "\xc3\x82\xc2\x80"
|
s2 = "\xc3\x82\xc2\x80"
|
||||||
if s1.respond_to?(:force_encoding)
|
if s1.respond_to?(:force_encoding)
|
||||||
s3 = s1
|
s1.force_encoding('ISO-8859-1')
|
||||||
s4 = s2
|
s2.force_encoding('UTF-8')
|
||||||
s1.force_encoding('ASCII-8BIT')
|
assert_equal s1.encode('UTF-8'), s2
|
||||||
s2.force_encoding('ASCII-8BIT')
|
|
||||||
s3.force_encoding('ISO-8859-1')
|
|
||||||
s4.force_encoding('UTF-8')
|
|
||||||
assert_equal s3.encode('UTF-8'), s4
|
|
||||||
end
|
end
|
||||||
c = Changeset.new(:repository => @repository,
|
c = Changeset.new(:repository => @repository,
|
||||||
:comments=>s2,
|
:comments => s2,
|
||||||
:revision=>'123',
|
:revision => '123',
|
||||||
:committed_on => Time.now)
|
:committed_on => Time.now)
|
||||||
assert c.save
|
assert c.save
|
||||||
assert_equal s2, c.comments
|
assert_equal s2, c.comments
|
||||||
|
Loading…
x
Reference in New Issue
Block a user