From: Toshi MARUYAMA Date: Tue, 8 Mar 2011 07:06:04 +0000 (+0000) Subject: scm: git: add latest changesets limit test in unit model test (#5357). X-Git-Tag: 1.2.0~788 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cc6931f58d3b0a1f890fc21fa6917558ac9277c0;p=redmine.git scm: git: add latest changesets limit test in unit model test (#5357). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5054 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/unit/repository_git_test.rb b/test/unit/repository_git_test.rb index 9795eb272..3a5fd5fd3 100644 --- a/test/unit/repository_git_test.rb +++ b/test/unit/repository_git_test.rb @@ -105,18 +105,29 @@ class RepositoryGitTest < ActiveSupport::TestCase '7234cb2750b63f47bff735edc50a1c0a433c2518', ], changesets.collect(&:revision) - # with path and revision + # with path, revision and limit changesets = @repository.latest_changesets('images', '899a15dba') assert_equal [ '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', '7234cb2750b63f47bff735edc50a1c0a433c2518', ], changesets.collect(&:revision) + changesets = @repository.latest_changesets('images', '899a15dba', 1) + assert_equal [ + '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', + ], changesets.collect(&:revision) + changesets = @repository.latest_changesets('README', '899a15dba') assert_equal [ '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', '7234cb2750b63f47bff735edc50a1c0a433c2518', ], changesets.collect(&:revision) + + changesets = @repository.latest_changesets('README', '899a15dba', 1) + assert_equal [ + '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', + ], changesets.collect(&:revision) + end def test_find_changeset_by_name