]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: add client command tests at unit adapter test (#4273).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 8 Apr 2011 04:53:11 +0000 (04:53 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 8 Apr 2011 04:53:11 +0000 (04:53 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5361 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb

index f35829c513658f21696febdeaba9104015996db5..0657c93b2847755481b3e8df157a71433fa91bb5 100644 (file)
@@ -15,6 +15,12 @@ begin
 
     if File.directory?(REPOSITORY_PATH)
       def setup
+        adapter_class = Redmine::Scm::Adapters::MercurialAdapter
+        assert adapter_class
+        assert adapter_class.client_command
+        assert_equal true, adapter_class.client_available
+        assert_equal true, adapter_class.client_version_above?([0, 9, 5])
+
         @adapter = Redmine::Scm::Adapters::MercurialAdapter.new(
                               REPOSITORY_PATH,
                               nil,
@@ -22,7 +28,6 @@ begin
                               nil,
                              'ISO-8859-1')
         @diff_c_support = true
-
         @char_1        = CHAR_1_HEX.dup
         @tag_char_1    = "tag-#{CHAR_1_HEX}-00"
         @branch_char_0 = "branch-#{CHAR_1_HEX}-00"