diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-03-14 18:59:10 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-03-14 18:59:10 +0000 |
commit | 4957752d122388f15738b47b2872465da81a6d32 (patch) | |
tree | fdc44b7d16daef79348f0c48ae9e1374f54648f1 /test | |
parent | b8b991a7dc3f253e1fbcb359e8280e7d0ff69b29 (diff) | |
download | redmine-4957752d122388f15738b47b2872465da81a6d32.tar.gz redmine-4957752d122388f15738b47b2872465da81a6d32.zip |
Strip repository urls (closes #852).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1248 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/repository_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/repository_test.rb b/test/unit/repository_test.rb index 21fb00b80..7764ee04a 100644 --- a/test/unit/repository_test.rb +++ b/test/unit/repository_test.rb @@ -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 |