Strip repository urls (closes #852).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1248 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-03-14 18:59:10 +00:00
parent b8b991a7dc
commit 4957752d12
2 changed files with 28 additions and 0 deletions
+9
View File
@@ -98,4 +98,13 @@ class RepositoryTest < Test::Unit::TestCase
assert_not_equal( comment, changeset.comments )
assert_equal( 'This is a loooooooooooooooooooooooooooong comment', changeset.comments )
end
def test_for_urls_strip
repository = Repository::Cvs.create(:project => Project.find(4), :url => ' :pserver:login:password@host:/path/to/the/repository',
:root_url => 'foo ')
assert repository.save
repository.reload
assert_equal ':pserver:login:password@host:/path/to/the/repository', repository.url
assert_equal 'foo', repository.root_url
end
end