1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
@@ -26,7 +26,7 class RepositoriesMercurialControllerTest < ActionController::TestCase | |||||
26 | REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s |
|
26 | REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s | |
27 | CHAR_1_HEX = "\xc3\x9c" |
|
27 | CHAR_1_HEX = "\xc3\x9c" | |
28 | PRJ_ID = 3 |
|
28 | PRJ_ID = 3 | |
29 |
NUM_REV = 3 |
|
29 | NUM_REV = 34 | |
30 |
|
30 | |||
31 | ruby19_non_utf8_pass = |
|
31 | ruby19_non_utf8_pass = | |
32 | (RUBY_VERSION >= '1.9' && Encoding.default_external.to_s != 'UTF-8') |
|
32 | (RUBY_VERSION >= '1.9' && Encoding.default_external.to_s != 'UTF-8') |
@@ -89,8 +89,8 begin | |||||
89 | adp = Redmine::Scm::Adapters::MercurialAdapter.new(repo) |
|
89 | adp = Redmine::Scm::Adapters::MercurialAdapter.new(repo) | |
90 | repo_path = adp.info.root_url.gsub(/\\/, "/") |
|
90 | repo_path = adp.info.root_url.gsub(/\\/, "/") | |
91 | assert_equal REPOSITORY_PATH, repo_path |
|
91 | assert_equal REPOSITORY_PATH, repo_path | |
92 |
assert_equal '3 |
|
92 | assert_equal '33', adp.info.lastrev.revision | |
93 |
assert_equal ' |
|
93 | assert_equal '2e6d546429230f377d7d19c2078abd2dd909f235',adp.info.lastrev.scmid | |
94 | end |
|
94 | end | |
95 | end |
|
95 | end | |
96 |
|
96 |
@@ -23,7 +23,7 class RepositoryMercurialTest < ActiveSupport::TestCase | |||||
23 | include Redmine::I18n |
|
23 | include Redmine::I18n | |
24 |
|
24 | |||
25 | REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s |
|
25 | REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s | |
26 |
NUM_REV = 3 |
|
26 | NUM_REV = 34 | |
27 | CHAR_1_HEX = "\xc3\x9c" |
|
27 | CHAR_1_HEX = "\xc3\x9c" | |
28 |
|
28 | |||
29 | def setup |
|
29 | def setup | |
@@ -263,7 +263,7 class RepositoryMercurialTest < ActiveSupport::TestCase | |||||
263 |
|
263 | |||
264 | # with_limit |
|
264 | # with_limit | |
265 | changesets = @repository.latest_changesets('', nil, 2) |
|
265 | changesets = @repository.latest_changesets('', nil, 2) | |
266 |
assert_equal |
|
266 | assert_equal ["#{NUM_REV - 1}", "#{NUM_REV - 2}"], changesets.collect(&:revision) | |
267 |
|
267 | |||
268 | # with_filepath |
|
268 | # with_filepath | |
269 | changesets = @repository.latest_changesets( |
|
269 | changesets = @repository.latest_changesets( | |
@@ -600,7 +600,7 class RepositoryMercurialTest < ActiveSupport::TestCase | |||||
600 | @repository.fetch_changesets |
|
600 | @repository.fetch_changesets | |
601 | @project.reload |
|
601 | @project.reload | |
602 | assert_equal NUM_REV, @repository.changesets.count |
|
602 | assert_equal NUM_REV, @repository.changesets.count | |
603 | %w|31 31eeee7395c8 31eee|.each do |r1| |
|
603 | ["#{NUM_REV - 1}", "2e6d54642923", "2e6d5"].each do |r1| | |
604 | changeset = @repository.find_changeset_by_name(r1) |
|
604 | changeset = @repository.find_changeset_by_name(r1) | |
605 | assert_nil changeset.next |
|
605 | assert_nil changeset.next | |
606 | end |
|
606 | end |
General Comments 0
You need to be logged in to leave comments.
Login now