summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-07-15 21:06:54 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-07-15 21:06:54 +0000
commit01a9e17c49af318eb7e42b8833fe913c918998c2 (patch)
tree47bffcaa0a112253085d0954b5d4292a3991e2e0 /test/unit
parent9ca8b20d55343494fff3bd6de5a47f51f490b896 (diff)
downloadredmine-01a9e17c49af318eb7e42b8833fe913c918998c2.tar.gz
redmine-01a9e17c49af318eb7e42b8833fe913c918998c2.zip
CVS root_url not recognized when connection string does not include port (#14422).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12027 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb15
1 files changed, 13 insertions, 2 deletions
diff --git a/test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb
index fd931316e..d9ca7af0c 100644
--- a/test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb
+++ b/test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb
@@ -80,8 +80,19 @@ begin
end
def test_root_url_path
- adapter = Redmine::Scm::Adapters::CvsAdapter.new('foo', ':pserver:cvs_user:cvs_password@123.456.789.123:9876/repo')
- assert_equal '/repo', adapter.send(:root_url_path)
+ to_test = {
+ ':pserver:cvs_user:cvs_password@123.456.789.123:9876/repo' => '/repo',
+ ':pserver:cvs_user:cvs_password@123.456.789.123/repo' => '/repo',
+ ':pserver:cvs_user:cvs_password@cvs_server:/repo' => '/repo',
+ ':pserver:cvs_user:cvs_password@cvs_server:9876/repo' => '/repo',
+ ':pserver:cvs_user:cvs_password@cvs_server/repo' => '/repo',
+ ':pserver:cvs_user:cvs_password@cvs_server/path/repo' => '/path/repo',
+ ':ext:cvsservername:/path' => '/path'
+ }
+
+ to_test.each do |string, expected|
+ assert_equal expected, Redmine::Scm::Adapters::CvsAdapter.new('foo', string).send(:root_url_path), "#{string} failed"
+ end
end
private