]> source.dussan.org Git - redmine.git/commitdiff
Merged r14235 from trunk to 3.0-stable.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 1 May 2015 16:57:38 +0000 (16:57 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 1 May 2015 16:57:38 +0000 (16:57 +0000)
prevent IssuesControllerTest#test_index_csv_big_5 fails randomly

git-svn-id: http://svn.redmine.org/redmine/branches/3.0-stable@14236 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/issues_controller_test.rb

index 28d4eef145287126371210dd2dad635b994e1100..c3ebaf4a306849dc876ad5515fc45ea302bb2ee0 100644 (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