From 4bde749d4021a209bc19eefc45bf3bcdf6f789e2 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 2 Feb 2014 11:41:01 +0000 Subject: [PATCH] scm: mercurial: split test_copied_files to sub method (#14361) git-svn-id: http://svn.redmine.org/redmine/trunk@12769 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/repository_mercurial_test.rb | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/test/unit/repository_mercurial_test.rb b/test/unit/repository_mercurial_test.rb index fc1516f10..1a861ca5d 100644 --- a/test/unit/repository_mercurial_test.rb +++ b/test/unit/repository_mercurial_test.rb @@ -323,12 +323,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase assert_latest_changesets_default_branch end - def test_copied_files - assert_equal 0, @repository.changesets.count - @repository.fetch_changesets - @project.reload - assert_equal NUM_REV, @repository.changesets.count - + def assert_copied_files cs1 = @repository.changesets.find_by_revision('13') assert_not_nil cs1 c1 = cs1.filechanges.sort_by(&:path) @@ -360,6 +355,15 @@ class RepositoryMercurialTest < ActiveSupport::TestCase assert_equal "/latin-1-dir/test-#{@char_1}.txt", c3[0].from_path assert_equal '5d9891a1b425', c3[0].from_revision end + private :assert_copied_files + + def test_copied_files_short_id + assert_equal 0, @repository.changesets.count + @repository.fetch_changesets + @project.reload + assert_equal NUM_REV, @repository.changesets.count + assert_copied_files + end def test_find_changeset_by_name assert_equal 0, @repository.changesets.count