]> source.dussan.org Git - redmine.git/commitdiff
scm: fix unit changeset_test.rb test methods calls randomly.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 22 Feb 2011 12:16:08 +0000 (12:16 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 22 Feb 2011 12:16:08 +0000 (12:16 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4924 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/changeset_test.rb

index 2f0415d3ab6cd75076afdea9e08da6b68825d4d8..cb4d640425aaa652f5bed3b822522dcc82e55ff4 100644 (file)
@@ -214,9 +214,11 @@ class ChangesetTest < ActiveSupport::TestCase
   end
   
   def test_invalid_utf8_sequences_in_comments_should_be_stripped
-    c = Changeset.new
-    c.comments = File.read("#{RAILS_ROOT}/test/fixtures/encoding/iso-8859-1.txt")
-    assert_equal "Texte encod en ISO-8859-1.", c.comments
+    with_settings :commit_logs_encoding => 'UTF-8' do
+      c = Changeset.new
+      c.comments = File.read("#{RAILS_ROOT}/test/fixtures/encoding/iso-8859-1.txt")
+      assert_equal "Texte encod en ISO-8859-1.", c.comments
+    end
   end
 
   def test_identifier