Defect #24030 » svn.diff
| test/functional/repositories_controller_test.rb | ||
|---|---|---|
| 188 | 188 |
end |
| 189 | 189 |
end |
| 190 | 190 | |
| 191 |
if repository_configured?('subversion')
|
|
| 191 |
if repository_configured?('subversion') &&
|
|
| 192 |
!(Redmine::Database::mysql? && !is_mysql_utf8mb4) |
|
| 192 | 193 |
def test_show_should_show_diff_button_depending_on_browse_repository_permission |
| 193 | 194 |
@request.session[:user_id] = 2 |
| 194 | 195 |
role = Role.find(1) |
| test/functional/repositories_subversion_controller_test.rb | ||
|---|---|---|
| 27 | 27 |
:issue_categories, :enumerations, :custom_fields, :custom_values, :trackers |
| 28 | 28 | |
| 29 | 29 |
PRJ_ID = 3 |
| 30 |
NUM_REV = 12
|
|
| 30 |
NUM_REV = 14
|
|
| 31 | 31 | |
| 32 | 32 |
def setup |
| 33 | 33 |
super |
| ... | ... | |
| 40 | 40 |
assert @repository |
| 41 | 41 |
end |
| 42 | 42 | |
| 43 |
if repository_configured?('subversion')
|
|
| 43 |
if repository_configured?('subversion') &&
|
|
| 44 |
!(Redmine::Database::mysql? && !is_mysql_utf8mb4) |
|
| 44 | 45 |
def test_new |
| 45 | 46 |
@request.session[:user_id] = 1 |
| 46 | 47 |
@project.repository.destroy |
| ... | ... | |
| 594 | 595 |
@project.reload |
| 595 | 596 |
assert_nil @project.repository |
| 596 | 597 |
end |
| 598 |
elsif !repository_configured?('subversion')
|
|
| 599 |
puts "Subversion test repository NOT FOUND. Skipping functional tests !!!" |
|
| 600 |
def test_fake; assert true end |
|
| 597 | 601 |
else |
| 598 |
puts "Subversion test repository NOT FOUND. Skipping functional tests !!!" |
|
| 602 |
puts "Subversion test repository contains Emoji." |
|
| 603 |
puts "Tests connot run on NOT utf8mb4 MySQL." |
|
| 604 |
puts "Skipping functional tests !!!" |
|
| 599 | 605 |
def test_fake; assert true end |
| 600 | 606 |
end |
| 601 | 607 |
end |
| test/unit/repository_subversion_test.rb | ||
|---|---|---|
| 24 | 24 | |
| 25 | 25 |
include Redmine::I18n |
| 26 | 26 | |
| 27 |
NUM_REV = 12
|
|
| 27 |
NUM_REV = 14
|
|
| 28 | 28 | |
| 29 | 29 |
def setup |
| 30 | 30 |
User.current = nil |
| ... | ... | |
| 91 | 91 |
end |
| 92 | 92 |
end |
| 93 | 93 | |
| 94 |
if repository_configured?('subversion')
|
|
| 94 |
if repository_configured?('subversion') &&
|
|
| 95 |
!(Redmine::Database::mysql? && !is_mysql_utf8mb4) |
|
| 95 | 96 |
def test_fetch_changesets_from_scratch |
| 96 | 97 |
assert_equal 0, @repository.changesets.count |
| 97 | 98 |
@repository.fetch_changesets |
| 98 | 99 |
@project.reload |
| 99 | 100 | |
| 100 | 101 |
assert_equal NUM_REV, @repository.changesets.count |
| 101 |
assert_equal 21, @repository.filechanges.count
|
|
| 102 |
assert_equal 23, @repository.filechanges.count
|
|
| 102 | 103 |
assert_equal 'Initial import.', @repository.changesets.find_by_revision('1').comments
|
| 103 | 104 |
end |
| 104 | 105 | |
| ... | ... | |
| 281 | 282 |
changeset = @repository.find_changeset_by_name(NUM_REV.to_s) |
| 282 | 283 |
assert_nil changeset.next |
| 283 | 284 |
end |
| 285 |
elsif !repository_configured?('subversion')
|
|
| 286 |
puts "Subversion test repository NOT FOUND. Skipping unit tests !!!" |
|
| 287 |
def test_fake; assert true end |
|
| 284 | 288 |
else |
| 285 |
puts "Subversion test repository NOT FOUND. Skipping unit tests !!!" |
|
| 289 |
puts "Subversion test repository contains Emoji." |
|
| 290 |
puts "Tests connot run on NOT utf8mb4 MySQL." |
|
| 291 |
puts "Skipping unit tests !!!" |
|
| 286 | 292 |
def test_fake; assert true end |
| 287 | 293 |
end |
| 288 | 294 |
end |
| test/unit/repository_subversion_test.rb | ||
|---|---|---|
| 247 | 247 |
end |
| 248 | 248 |
end |
| 249 | 249 | |
| 250 |
def test_utf8_emoji |
|
| 251 |
assert_equal 0, @repository.changesets.count |
|
| 252 |
@repository.fetch_changesets |
|
| 253 |
@project.reload |
|
| 254 |
assert_equal NUM_REV, @repository.changesets.count |
|
| 255 |
changeset = @repository.find_changeset_by_name('13')
|
|
| 256 |
assert_equal "U+1F603\u{1F603}", changeset.committer
|
|
| 257 |
assert_equal "U+1F603\u{1F603}", changeset.comments
|
|
| 258 |
end |
|
| 259 | ||
| 250 | 260 |
def test_previous |
| 251 | 261 |
assert_equal 0, @repository.changesets.count |
| 252 | 262 |
@repository.fetch_changesets |