summaryrefslogtreecommitdiffstats
path: root/test/unit/repository_mercurial_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-02-02 11:40:44 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-02-02 11:40:44 +0000
commitfebd239d225c5e0e013d70315457a4c2579b0afc (patch)
tree5b870c67df26fa2b35c92fd497c1ff5df3012ce2 /test/unit/repository_mercurial_test.rb
parent1f2a520a4614e5ed614e0083b80c02d9522be6f3 (diff)
downloadredmine-febd239d225c5e0e013d70315457a4c2579b0afc.tar.gz
redmine-febd239d225c5e0e013d70315457a4c2579b0afc.zip
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
Diffstat (limited to 'test/unit/repository_mercurial_test.rb')
-rw-r--r--test/unit/repository_mercurial_test.rb15
1 files 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