diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-02 11:41:17 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-02 11:41:17 +0000 |
commit | da071e5531d43f94b28b9043324e2688f3001b80 (patch) | |
tree | 2d4ade51bef731c9481e2c45d0f18ec417d60449 /test/unit/repository_mercurial_test.rb | |
parent | 4bde749d4021a209bc19eefc45bf3bcdf6f789e2 (diff) | |
download | redmine-da071e5531d43f94b28b9043324e2688f3001b80.tar.gz redmine-da071e5531d43f94b28b9043324e2688f3001b80.zip |
scm: mercurial: split test_parents to sub method (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12770 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/repository_mercurial_test.rb')
-rw-r--r-- | test/unit/repository_mercurial_test.rb | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/test/unit/repository_mercurial_test.rb b/test/unit/repository_mercurial_test.rb index 1a861ca5d..d2efd848a 100644 --- a/test/unit/repository_mercurial_test.rb +++ b/test/unit/repository_mercurial_test.rb @@ -422,11 +422,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase end end - def test_parents - assert_equal 0, @repository.changesets.count - @repository.fetch_changesets - @project.reload - assert_equal NUM_REV, @repository.changesets.count + def assert_parents r1 = @repository.changesets.find_by_revision('0') assert_equal [], r1.parents r2 = @repository.changesets.find_by_revision('1') @@ -439,6 +435,15 @@ class RepositoryMercurialTest < ActiveSupport::TestCase assert_equal "3a330eb32958", r4[0] assert_equal "a94b0528f24f", r4[1] end + private :assert_parents + + def test_parents_short_id + assert_equal 0, @repository.changesets.count + @repository.fetch_changesets + @project.reload + assert_equal NUM_REV, @repository.changesets.count + assert_parents + end def test_activities c = Changeset.new(:repository => @repository, |