]> source.dussan.org Git - redmine.git/commitdiff
scm: git: add test of revisions() with invalid revision in unit adapter test (#7146).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 12 May 2011 23:45:04 +0000 (23:45 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 12 May 2011 23:45:04 +0000 (23:45 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5764 e93f8b46-1217-0410-a6f0-8f06a7374b81

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

index 8274e8b1d3d1129f7a8a40506e2aea8d17e0d3c1..6b9c158d026493046b3315dc7b139f5ad32ac668 100644 (file)
@@ -163,6 +163,15 @@ begin
         assert_equal '1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127', revs2[-1].identifier
       end
 
+      def test_revisions_invalid_rev
+        revs1 = nil
+        revs1 = @adapter.revisions('',
+                                    '1234abcd',
+                                    "master",
+                                    {:reverse => true})
+        assert_equal [], revs1
+      end
+
       def test_getting_revisions_with_spaces_in_filename
         assert_equal 1, @adapter.revisions("filemane with spaces.txt",
                                            nil, nil, :all => true).length