diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-03-08 07:06:25 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-03-08 07:06:25 +0000 |
commit | 71ac6a29f070e315b04a5be7a0bc07a170238374 (patch) | |
tree | 74221f2f7274ca701307864b57c18ce4c265b718 /test/unit/repository_git_test.rb | |
parent | cc6931f58d3b0a1f890fc21fa6917558ac9277c0 (diff) | |
download | redmine-71ac6a29f070e315b04a5be7a0bc07a170238374.tar.gz redmine-71ac6a29f070e315b04a5be7a0bc07a170238374.zip |
scm: git: add latest changesets tag test in unit model test (#5357).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5055 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/repository_git_test.rb')
-rw-r--r-- | test/unit/repository_git_test.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/unit/repository_git_test.rb b/test/unit/repository_git_test.rb index 3a5fd5fd3..3783f9e6d 100644 --- a/test/unit/repository_git_test.rb +++ b/test/unit/repository_git_test.rb @@ -128,6 +128,28 @@ class RepositoryGitTest < ActiveSupport::TestCase '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', ], changesets.collect(&:revision) + # with path, tag and limit + changesets = @repository.latest_changesets('images', 'tag01.annotated') + assert_equal [ + '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', + '7234cb2750b63f47bff735edc50a1c0a433c2518', + ], changesets.collect(&:revision) + + changesets = @repository.latest_changesets('images', 'tag01.annotated', 1) + assert_equal [ + '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', + ], changesets.collect(&:revision) + + changesets = @repository.latest_changesets('README', 'tag01.annotated') + assert_equal [ + '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', + '7234cb2750b63f47bff735edc50a1c0a433c2518', + ], changesets.collect(&:revision) + + changesets = @repository.latest_changesets('README', 'tag01.annotated', 1) + assert_equal [ + '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', + ], changesets.collect(&:revision) end def test_find_changeset_by_name |