Defect #24030 » svn.diff
| test/functional/repositories_controller_test.rb | ||
|---|---|---|
|
end
|
||
|
end
|
||
|
if repository_configured?('subversion')
|
||
|
if repository_configured?('subversion') &&
|
||
|
!(Redmine::Database::mysql? && !is_mysql_utf8mb4)
|
||
|
def test_show_should_show_diff_button_depending_on_browse_repository_permission
|
||
|
@request.session[:user_id] = 2
|
||
|
role = Role.find(1)
|
||
| test/functional/repositories_subversion_controller_test.rb | ||
|---|---|---|
|
:issue_categories, :enumerations, :custom_fields, :custom_values, :trackers
|
||
|
PRJ_ID = 3
|
||
|
NUM_REV = 12
|
||
|
NUM_REV = 14
|
||
|
def setup
|
||
|
super
|
||
| ... | ... | |
|
assert @repository
|
||
|
end
|
||
|
if repository_configured?('subversion')
|
||
|
if repository_configured?('subversion') &&
|
||
|
!(Redmine::Database::mysql? && !is_mysql_utf8mb4)
|
||
|
def test_new
|
||
|
@request.session[:user_id] = 1
|
||
|
@project.repository.destroy
|
||
| ... | ... | |
|
@project.reload
|
||
|
assert_nil @project.repository
|
||
|
end
|
||
|
elsif !repository_configured?('subversion')
|
||
|
puts "Subversion test repository NOT FOUND. Skipping functional tests !!!"
|
||
|
def test_fake; assert true end
|
||
|
else
|
||
|
puts "Subversion test repository NOT FOUND. Skipping functional tests !!!"
|
||
|
puts "Subversion test repository contains Emoji."
|
||
|
puts "Tests connot run on NOT utf8mb4 MySQL."
|
||
|
puts "Skipping functional tests !!!"
|
||
|
def test_fake; assert true end
|
||
|
end
|
||
|
end
|
||
| test/unit/repository_subversion_test.rb | ||
|---|---|---|
|
include Redmine::I18n
|
||
|
NUM_REV = 12
|
||
|
NUM_REV = 14
|
||
|
def setup
|
||
|
User.current = nil
|
||
| ... | ... | |
|
end
|
||
|
end
|
||
|
if repository_configured?('subversion')
|
||
|
if repository_configured?('subversion') &&
|
||
|
!(Redmine::Database::mysql? && !is_mysql_utf8mb4)
|
||
|
def test_fetch_changesets_from_scratch
|
||
|
assert_equal 0, @repository.changesets.count
|
||
|
@repository.fetch_changesets
|
||
|
@project.reload
|
||
|
assert_equal NUM_REV, @repository.changesets.count
|
||
|
assert_equal 21, @repository.filechanges.count
|
||
|
assert_equal 23, @repository.filechanges.count
|
||
|
assert_equal 'Initial import.', @repository.changesets.find_by_revision('1').comments
|
||
|
end
|
||
| ... | ... | |
|
changeset = @repository.find_changeset_by_name(NUM_REV.to_s)
|
||
|
assert_nil changeset.next
|
||
|
end
|
||
|
elsif !repository_configured?('subversion')
|
||
|
puts "Subversion test repository NOT FOUND. Skipping unit tests !!!"
|
||
|
def test_fake; assert true end
|
||
|
else
|
||
|
puts "Subversion test repository NOT FOUND. Skipping unit tests !!!"
|
||
|
puts "Subversion test repository contains Emoji."
|
||
|
puts "Tests connot run on NOT utf8mb4 MySQL."
|
||
|
puts "Skipping unit tests !!!"
|
||
|
def test_fake; assert true end
|
||
|
end
|
||
|
end
|
||
| test/unit/repository_subversion_test.rb | ||
|---|---|---|
|
end
|
||
|
end
|
||
|
def test_utf8_emoji
|
||
|
assert_equal 0, @repository.changesets.count
|
||
|
@repository.fetch_changesets
|
||
|
@project.reload
|
||
|
assert_equal NUM_REV, @repository.changesets.count
|
||
|
changeset = @repository.find_changeset_by_name('13')
|
||
|
assert_equal "U+1F603\u{1F603}", changeset.committer
|
||
|
assert_equal "U+1F603\u{1F603}", changeset.comments
|
||
|
end
|
||
|
def test_previous
|
||
|
assert_equal 0, @repository.changesets.count
|
||
|
@repository.fetch_changesets
|
||