From e334d3dba932370fcf08455500b986a57f5977fc Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 18 Feb 2011 07:15:58 +0000 Subject: [PATCH] scm: mercurial: unit test for named branches at adapter (#7246). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4875 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../redmine/scm/adapters/mercurial_adapter_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb index 8ce2d208..d275798c 100644 --- a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb @@ -228,6 +228,18 @@ begin assert_equal tm, @adapter.tagmap end + def test_branches + assert_equal ['default', 'branch (1)[2]&,%.-3_4', 'test-branch-00'], + @adapter.branches + end + + def test_branchmap + bm = { 'default' => '4cddb4e45f52', + 'branch (1)[2]&,%.-3_4' => '933ca60293d7', + 'test-branch-00' => '3a330eb32958' } + assert_equal bm, @adapter.branchmap + end + private def test_hgversion_for(hgversion, version)