@@ -260,6 +260,25 class RepositoryMercurialTest < ActiveSupport::TestCase | |||||
260 | end |
|
260 | end | |
261 | end |
|
261 | end | |
262 |
|
262 | |||
|
263 | def test_parents | |||
|
264 | assert_equal 0, @repository.changesets.count | |||
|
265 | @repository.fetch_changesets | |||
|
266 | @project.reload | |||
|
267 | assert_equal NUM_REV, @repository.changesets.count | |||
|
268 | r1 = @repository.changesets.find_by_revision('0') | |||
|
269 | assert_equal [], r1.parents | |||
|
270 | r2 = @repository.changesets.find_by_revision('1') | |||
|
271 | assert_equal 1, r2.parents.length | |||
|
272 | assert_equal "0885933ad4f6", | |||
|
273 | r2.parents[0].identifier | |||
|
274 | r3 = @repository.changesets.find_by_revision('30') | |||
|
275 | assert_equal 2, r3.parents.length | |||
|
276 | assert_equal "a94b0528f24f", | |||
|
277 | r3.parents[0].identifier | |||
|
278 | assert_equal "3a330eb32958", | |||
|
279 | r3.parents[1].identifier | |||
|
280 | end | |||
|
281 | ||||
263 | def test_activities |
|
282 | def test_activities | |
264 | c = Changeset.new(:repository => @repository, |
|
283 | c = Changeset.new(:repository => @repository, | |
265 | :committed_on => Time.now, |
|
284 | :committed_on => Time.now, |
General Comments 0
You need to be logged in to leave comments.
Login now