1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-31 04:39:40 +00:00

prevent IssuesControllerTest#test_index_csv_big_5 fails randomly

git-svn-id: http://svn.redmine.org/redmine/trunk@14235 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2015-05-01 16:30:36 +00:00
parent 2f67c8e214
commit 3568b3729c

View File

@ -537,10 +537,10 @@ class IssuesControllerTest < ActionController::TestCase
assert_equal 'text/csv; header=present', @response.content_type
lines = @response.body.chomp.split("\n")
header = lines[0]
status = "\xaa\xac\xbaA".force_encoding('Big5')
assert header.include?(status)
issue_line = lines.find {|l| l =~ /^#{issue.id},/}
s1 = "\xaa\xac\xbaA".force_encoding('Big5')
assert_include s1, header
assert_include str_big5, issue_line
assert issue_line.include?(str_big5)
end
end