From febd239d225c5e0e013d70315457a4c2579b0afc Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 2 Feb 2014 11:40:44 +0000 Subject: [PATCH] scm: mercurial: split test_entries_short_id to sub method (#14361) git-svn-id: http://svn.redmine.org/redmine/trunk@12768 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/repository_mercurial_test.rb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/test/unit/repository_mercurial_test.rb b/test/unit/repository_mercurial_test.rb index 3ecea8aa2..fc1516f10 100644 --- a/test/unit/repository_mercurial_test.rb +++ b/test/unit/repository_mercurial_test.rb @@ -85,11 +85,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase 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 + def assert_entries [2, '400bb8672109', '400', 400].each do |r| entries1 = @repository.entries(nil, r) assert entries1 @@ -102,6 +98,15 @@ class RepositoryMercurialTest < ActiveSupport::TestCase assert_equal '9d5b5b004199', readme.changeset.scmid end end + private :assert_entries + + def test_entries_short_id + assert_equal 0, @repository.changesets.count + @repository.fetch_changesets + @project.reload + assert_equal NUM_REV, @repository.changesets.count + assert_entries + end def test_entry_on_tip entry = @repository.entry