[#436] Fix test relying on trailing whitespace.

This commit is contained in:
Holger Just 2011-05-31 09:59:19 +02:00
parent a428fa6068
commit db3480bdb6
1 changed files with 2 additions and 6 deletions

View File

@ -109,17 +109,13 @@ class RepositoryTest < ActiveSupport::TestCase
def test_for_changeset_comments_strip
repository = Repository::Mercurial.create( :project => Project.find( 4 ), :url => '/foo/bar/baz' )
comment = <<-COMMENT
This is a loooooooooooooooooooooooooooong comment
COMMENT
comment = "This is a looooooooooooooong comment" + (" " * 80 + "\n") * 5
changeset = Changeset.new(
:comments => comment, :commit_date => Time.now, :revision => 0, :scmid => 'f39b7922fb3c',
:committer => 'foo <foo@example.com>', :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_equal( 'This is a looooooooooooooong comment', changeset.comments )
end
def test_for_urls_strip