scm: mercurial: add model entries test (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12757 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
d26b4fc5b7
commit
1662720d7b
|
@ -80,11 +80,29 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
|
|||
assert_equal true, klass.scm_available
|
||||
end
|
||||
|
||||
def test_entries
|
||||
def test_entries_on_tip
|
||||
entries = @repository.entries
|
||||
assert_kind_of Redmine::Scm::Adapters::Entries, entries
|
||||
end
|
||||
|
||||
def test_entries_short_id
|
||||
assert_equal 0, @repository.changesets.count
|
||||
@repository.fetch_changesets
|
||||
@project.reload
|
||||
assert_equal NUM_REV, @repository.changesets.count
|
||||
[2, '400bb8672109', '400', 400].each do |r|
|
||||
entries1 = @repository.entries(nil, r)
|
||||
assert entries1
|
||||
assert_kind_of Redmine::Scm::Adapters::Entries, entries1
|
||||
assert_equal 3, entries1.size
|
||||
readme = entries1[2]
|
||||
assert_equal '1', readme.lastrev.revision
|
||||
assert_equal '9d5b5b004199', readme.lastrev.identifier
|
||||
assert_equal '1', readme.changeset.revision
|
||||
assert_equal '9d5b5b004199', readme.changeset.scmid
|
||||
end
|
||||
end
|
||||
|
||||
def test_fetch_changesets_from_scratch
|
||||
assert_equal 0, @repository.changesets.count
|
||||
@repository.fetch_changesets
|
||||
|
|
Loading…
Reference in New Issue