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
This commit is contained in:
Toshi MARUYAMA 2014-02-02 11:41:01 +00:00
parent febd239d22
commit 4bde749d40
1 changed files with 10 additions and 6 deletions

View File

@ -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