]> source.dussan.org Git - redmine.git/commitdiff
Don't use assert_equal nil.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 13 Dec 2016 20:12:34 +0000 (20:12 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 13 Dec 2016 20:12:34 +0000 (20:12 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@16072 e93f8b46-1217-0410-a6f0-8f06a7374b81

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

index b093e310951c27373e1a9d90784b6043512f39c2..e3c04f0257d9846f85101decfe62f87e8f7fe306 100644 (file)
@@ -447,7 +447,11 @@ class MercurialAdapterTest < ActiveSupport::TestCase
 
     def test_hgversion_for(hgversion, version)
       @adapter.class.expects(:hgversion_from_command_line).returns(hgversion)
-      assert_equal version, @adapter.class.hgversion
+      if version
+        assert_equal version, @adapter.class.hgversion
+      else
+        assert_nil @adapter.class.hgversion
+      end
     end
 
     def test_template_path_for(version, template)