From 3a0cc09d7cc8f1495a6d6ef1012908a93a32c3ae Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 10 Jul 2017 04:47:56 +0000 Subject: [PATCH] =?utf8?q?replace=20white=20spaces=20of=20here-text?= =?utf8?q?=E3=80=80at=20RepositoryTest#test=5Ffor=5Fchangeset=5Fcomments?= =?utf8?q?=5Fstrip?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.redmine.org/redmine/trunk@16809 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/repository_test.rb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/test/unit/repository_test.rb b/test/unit/repository_test.rb index 859b5ca43..cbcf8a0e9 100644 --- a/test/unit/repository_test.rb +++ b/test/unit/repository_test.rb @@ -279,20 +279,18 @@ class RepositoryTest < ActiveSupport::TestCase repository = Repository::Mercurial.create( :project => Project.find( 4 ), :url => '/foo/bar/baz' ) - comment = <<-COMMENT - This is a loooooooooooooooooooooooooooong comment - - - COMMENT + long_whitespace = " " + expected_comment = "This is a loooooooooooooooooooooooooooong comment" + comment = "#{expected_comment}#{long_whitespace}\n" + 3.times {comment << "#{long_whitespace}\n"} changeset = Changeset.new( :comments => comment, :commit_date => Time.now, :revision => 0, :scmid => 'f39b7922fb3c', :committer => 'foo ', :committed_on => Time.now, :repository => repository ) assert( changeset.save ) - assert_not_equal( comment, changeset.comments ) - assert_equal( 'This is a loooooooooooooooooooooooooooong comment', - changeset.comments ) + assert_not_equal comment, changeset.comments + assert_equal expected_comment, changeset.comments end def test_for_urls_strip_cvs -- 2.39.5