]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: add latest changesets supporting tag test in unit model test (#1981).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 14 Mar 2011 11:15:23 +0000 (11:15 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 14 Mar 2011 11:15:23 +0000 (11:15 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5126 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/repository_mercurial_test.rb

index 1421c1aa0b3518d9fa847a375a22c0a7f247934e..5609ceb723a7fe7e52a7b92f06debd0093dbb2da 100644 (file)
@@ -136,6 +136,19 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
 
       changesets = @repository.latest_changesets(path, '12', 1)
       assert_equal %w|12|, changesets.collect(&:revision)
+
+      # tag
+      changesets = @repository.latest_changesets('', 'tag_test.00')
+      assert_equal %w|5 4 3 2 1 0|, changesets.collect(&:revision)
+
+      changesets = @repository.latest_changesets('', 'tag_test.00', 2)
+      assert_equal %w|5 4|, changesets.collect(&:revision)
+
+      changesets = @repository.latest_changesets('sources', 'tag_test.00')
+      assert_equal %w|4 3 2 1 0|, changesets.collect(&:revision)
+      
+      changesets = @repository.latest_changesets('sources', 'tag_test.00', 2)
+      assert_equal %w|4 3|, changesets.collect(&:revision)
     end
 
     def test_copied_files