Skip to content

Commit db8cf0e

Browse files
committed
Fixes tests broken by test data for OTWO-1177.
1 parent 9180c58 commit db8cf0e

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

test/unit/bzr_commits_test.rb

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ class BzrCommitsTest < Scm::Test
55

66
def test_commit_count
77
with_bzr_repository('bzr') do |bzr|
8-
assert_equal 6, bzr.commit_count
9-
assert_equal 5, bzr.commit_count(:after => revision_ids.first)
10-
assert_equal 1, bzr.commit_count(:after => revision_ids[4])
8+
assert_equal 7, bzr.commit_count
9+
assert_equal 6, bzr.commit_count(:after => revision_ids.first)
10+
assert_equal 1, bzr.commit_count(:after => revision_ids[5])
1111
assert_equal 0, bzr.commit_count(:after => revision_ids.last)
1212
end
1313
end
@@ -36,8 +36,8 @@ def test_commit_count_trunk_only
3636
def test_commit_tokens_after
3737
with_bzr_repository('bzr') do |bzr|
3838
assert_equal revision_ids, bzr.commit_tokens
39-
assert_equal revision_ids[1..5], bzr.commit_tokens(:after => revision_ids.first)
40-
assert_equal revision_ids[5..5], bzr.commit_tokens(:after => revision_ids[4])
39+
assert_equal revision_ids[1..6], bzr.commit_tokens(:after => revision_ids.first)
40+
assert_equal revision_ids[6..6], bzr.commit_tokens(:after => revision_ids[5])
4141
assert_equal [], bzr.commit_tokens(:after => revision_ids.last)
4242
end
4343
end
@@ -183,7 +183,7 @@ def test_nested_branches_commits_trunk_only_true
183183
def test_commits
184184
with_bzr_repository('bzr') do |bzr|
185185
assert_equal revision_ids, bzr.commits.collect { |c| c.token }
186-
assert_equal revision_ids[5..5], bzr.commits(:after => revision_ids[4]).collect { |c| c.token }
186+
assert_equal revision_ids[6..6], bzr.commits(:after => revision_ids[5]).collect { |c| c.token }
187187
assert_equal [], bzr.commits(:after => revision_ids.last).collect { |c| c.token }
188188

189189
# Check that the diffs are not populated
@@ -368,7 +368,8 @@ def revision_ids
368368
'obnox@samba.org-20090204002453-u70a3ehf3ae9kay1', # 3
369369
'obnox@samba.org-20090204002518-yb0x153oa6mhoodu', # 4
370370
'obnox@samba.org-20090204002540-gmana8tk5f9gboq9', # 5
371-
'obnox@samba.org-20090204004942-73rnw0izen42f154' # 6
371+
'obnox@samba.org-20090204004942-73rnw0izen42f154', # 6
372+
'test@example.com-20111222183733-y91if5npo3pe8ifs', # 7
372373
]
373374
end
374375

test/unit/bzr_head_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ class BzrHeadTest < Scm::Test
55

66
def test_head_and_parents
77
with_bzr_repository('bzr') do |bzr|
8-
assert_equal 'obnox@samba.org-20090204004942-73rnw0izen42f154', bzr.head_token
9-
assert_equal 'obnox@samba.org-20090204004942-73rnw0izen42f154', bzr.head.token
8+
assert_equal 'test@example.com-20111222183733-y91if5npo3pe8ifs', bzr.head_token
9+
assert_equal 'test@example.com-20111222183733-y91if5npo3pe8ifs', bzr.head.token
1010
assert bzr.head.diffs.any? # diffs should be populated
1111

12-
assert_equal 'obnox@samba.org-20090204002540-gmana8tk5f9gboq9', bzr.parents(bzr.head).first.token
12+
assert_equal 'obnox@samba.org-20090204004942-73rnw0izen42f154', bzr.parents(bzr.head).first.token
1313
assert bzr.parents(bzr.head).first.diffs.any?
1414
end
1515
end

test/unit/bzr_misc_test.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ def test_exist
1414

1515
def test_ls_tree
1616
with_bzr_repository('bzr') do |bzr|
17-
assert_equal ['file1.txt',
17+
assert_equal ['Cédric.txt',
18+
'file1.txt',
1819
'file3.txt',
1920
'file4.txt',
2021
'file5.txt'],
@@ -26,7 +27,7 @@ def test_export
2627
with_bzr_repository('bzr') do |bzr|
2728
Scm::ScratchDir.new do |dir|
2829
bzr.export(dir)
29-
assert_equal ['.', '..', 'file1.txt', 'file3.txt', 'file4.txt', 'file5.txt'], Dir.entries(dir).sort
30+
assert_equal ['.', '..', 'Cédric.txt', 'file1.txt', 'file3.txt', 'file4.txt', 'file5.txt'], Dir.entries(dir).sort
3031
end
3132
end
3233
end

test/unit/bzrlib_head_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ class BzrBzrlibHeadTest < Scm::Test
55

66
def test_head_and_parents
77
with_bzrlib_repository('bzr') do |bzr|
8-
assert_equal 'obnox@samba.org-20090204004942-73rnw0izen42f154', bzr.head_token
9-
assert_equal 'obnox@samba.org-20090204004942-73rnw0izen42f154', bzr.head.token
8+
assert_equal 'test@example.com-20111222183733-y91if5npo3pe8ifs', bzr.head_token
9+
assert_equal 'test@example.com-20111222183733-y91if5npo3pe8ifs', bzr.head.token
1010
assert bzr.head.diffs.any? # diffs should be populated
1111

12-
assert_equal 'obnox@samba.org-20090204002540-gmana8tk5f9gboq9', bzr.parents(bzr.head).first.token
12+
assert_equal 'obnox@samba.org-20090204004942-73rnw0izen42f154', bzr.parents(bzr.head).first.token
1313
assert bzr.parents(bzr.head).first.diffs.any?
1414
end
1515
end

0 commit comments

Comments
 (0)