diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-02 11:41:01 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-02 11:41:01 +0000 |
commit | 4bde749d4021a209bc19eefc45bf3bcdf6f789e2 (patch) | |
tree | 91f7ff4e2f1fa5849a3b88f82538da369216b66b /test/unit/repository_mercurial_test.rb | |
parent | febd239d225c5e0e013d70315457a4c2579b0afc (diff) | |
download | redmine-4bde749d4021a209bc19eefc45bf3bcdf6f789e2.tar.gz redmine-4bde749d4021a209bc19eefc45bf3bcdf6f789e2.zip |
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
Diffstat (limited to 'test/unit/repository_mercurial_test.rb')
-rw-r--r-- | test/unit/repository_mercurial_test.rb | 16 |
1 files 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 |