From: Go MAEDA Date: Sun, 31 Mar 2019 11:07:56 +0000 (+0000) Subject: Merged r18028 from trunk to 4.0-stable (#31113). X-Git-Tag: 4.0.4~25 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0a01dc7366d2a1cff8d557516e7b2780d0d4ba7e;p=redmine.git Merged r18028 from trunk to 4.0-stable (#31113). git-svn-id: http://svn.redmine.org/redmine/branches/4.0-stable@18029 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/Gemfile b/Gemfile index 042a3bb19..419e65a71 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' gem "bundler", ">= 1.5.0" -gem "rails", "5.2.2.1" +gem "rails", "5.2.3" gem "rouge", "~> 3.3.0" gem "request_store", "1.0.5" gem "mini_mime", "~> 1.0.1" diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 377ee1fb1..2b9cd978e 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -591,7 +591,7 @@ class IssuesControllerTest < Redmine::ControllerTest } assert_response :success - assert_equal 'text/csv; header=present', @response.content_type + assert_equal 'text/csv', @response.content_type assert response.body.starts_with?("#,") lines = response.body.chomp.split("\n") # default columns + id and project @@ -605,7 +605,7 @@ class IssuesControllerTest < Redmine::ControllerTest } assert_response :success - assert_equal 'text/csv; header=present', @response.content_type + assert_equal 'text/csv', @response.content_type end def test_index_csv_without_any_filters @@ -633,7 +633,7 @@ class IssuesControllerTest < Redmine::ControllerTest assert_response :success end - assert_equal 'text/csv; header=present', response.content_type + assert_equal 'text/csv', response.content_type headers = response.body.chomp.split("\n").first.split(',') assert_include 'Description', headers assert_include 'test_index_csv_with_description', response.body @@ -649,7 +649,7 @@ class IssuesControllerTest < Redmine::ControllerTest :c => %w(subject spent_hours) } assert_response :success - assert_equal 'text/csv; header=present', @response.content_type + assert_equal 'text/csv', @response.content_type lines = @response.body.chomp.split("\n") assert_include "#{issue.id},#{issue.subject},7.33", lines end @@ -661,7 +661,7 @@ class IssuesControllerTest < Redmine::ControllerTest } assert_response :success - assert_equal 'text/csv; header=present', @response.content_type + assert_equal 'text/csv', @response.content_type assert_match /\A#,/, response.body lines = response.body.chomp.split("\n") assert_equal IssueQuery.new.available_inline_columns.size, lines[0].split(',').size @@ -733,7 +733,7 @@ class IssuesControllerTest < Redmine::ControllerTest :subject => str_utf8, :format => 'csv' } - assert_equal 'text/csv; header=present', @response.content_type + assert_equal 'text/csv', @response.content_type lines = @response.body.chomp.split("\n") header = lines[0] status = "\xaa\xac\xbaA".force_encoding('Big5') @@ -755,7 +755,7 @@ class IssuesControllerTest < Redmine::ControllerTest :format => 'csv', :set_filter => 1 } - assert_equal 'text/csv; header=present', @response.content_type + assert_equal 'text/csv', @response.content_type lines = @response.body.chomp.split("\n") header = lines[0] issue_line = lines.find {|l| l =~ /^#{issue.id},/} @@ -779,7 +779,7 @@ class IssuesControllerTest < Redmine::ControllerTest :format => 'csv', :set_filter => 1 } - assert_equal 'text/csv; header=present', @response.content_type + assert_equal 'text/csv', @response.content_type lines = @response.body.chomp.split("\n") assert_include "#{issue.id},1234.50,#{str1}", lines end @@ -797,7 +797,7 @@ class IssuesControllerTest < Redmine::ControllerTest :format => 'csv', :set_filter => 1 } - assert_equal 'text/csv; header=present', @response.content_type + assert_equal 'text/csv', @response.content_type lines = @response.body.chomp.split("\n") assert_include "#{issue.id};1234,50;#{str1}", lines end @@ -1263,7 +1263,7 @@ class IssuesControllerTest < Redmine::ControllerTest :format => 'csv' } assert_response :success - assert_equal 'text/csv; header=present', response.content_type + assert_equal 'text/csv', response.content_type lines = response.body.chomp.split("\n") assert_include '1,"Related to #7, Related to #8, Blocks #11"', lines assert_include '2,Blocked by #12', lines diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb index 1139d0756..e025563c2 100644 --- a/test/functional/timelog_controller_test.rb +++ b/test/functional/timelog_controller_test.rb @@ -1236,7 +1236,7 @@ class TimelogControllerTest < Redmine::ControllerTest with_settings :date_format => '%m/%d/%Y' do get :index, :params => {:format => 'csv'} assert_response :success - assert_equal 'text/csv; header=present', response.content_type + assert_equal 'text/csv', response.content_type end end @@ -1244,7 +1244,7 @@ class TimelogControllerTest < Redmine::ControllerTest with_settings :date_format => '%m/%d/%Y' do get :index, :params => {:project_id => 1, :format => 'csv'} assert_response :success - assert_equal 'text/csv; header=present', response.content_type + assert_equal 'text/csv', response.content_type end end diff --git a/test/functional/timelog_report_test.rb b/test/functional/timelog_report_test.rb index 6d053b55d..4929ba286 100644 --- a/test/functional/timelog_report_test.rb +++ b/test/functional/timelog_report_test.rb @@ -232,7 +232,7 @@ class TimelogReportTest < Redmine::ControllerTest :format => "csv" } assert_response :success - assert_equal 'text/csv; header=present', @response.content_type + assert_equal 'text/csv', @response.content_type lines = @response.body.chomp.split("\n") # Headers assert_equal 'Project,User,Activity,2007-3,2007-4,Total time', lines.first @@ -250,7 +250,7 @@ class TimelogReportTest < Redmine::ControllerTest :format => "csv" } assert_response :success - assert_equal 'text/csv; header=present', @response.content_type + assert_equal 'text/csv', @response.content_type lines = @response.body.chomp.split("\n") # Headers assert_equal 'Project,User,Activity,2007-3,2007-4,Total time', lines.first @@ -289,7 +289,7 @@ class TimelogReportTest < Redmine::ControllerTest } end assert_response :success - assert_equal 'text/csv; header=present', @response.content_type + assert_equal 'text/csv', @response.content_type lines = @response.body.chomp.split("\n") # Headers s1 = "\xa5\xce\xa4\xe1,2011-11-11,\xa4u\xae\xc9\xc1`\xadp".force_encoding('Big5') @@ -336,7 +336,7 @@ class TimelogReportTest < Redmine::ControllerTest } end assert_response :success - assert_equal 'text/csv; header=present', @response.content_type + assert_equal 'text/csv', @response.content_type lines = @response.body.chomp.split("\n") # Headers s1 = "\xa5\xce\xa4\xe1,2011-11-11,\xa4u\xae\xc9\xc1`\xadp".force_encoding('Big5') @@ -371,7 +371,7 @@ class TimelogReportTest < Redmine::ControllerTest :format => "csv" } assert_response :success - assert_equal 'text/csv; header=present', @response.content_type + assert_equal 'text/csv', @response.content_type lines = @response.body.chomp.split("\n") # Headers s1 = "Utilisateur;2011-11-11;Temps total".force_encoding('ISO-8859-1') diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb index 42999ea9e..a949626f5 100644 --- a/test/functional/users_controller_test.rb +++ b/test/functional/users_controller_test.rb @@ -72,7 +72,7 @@ class UsersControllerTest < Redmine::ControllerTest assert_equal User.logged.status(1).count, response.body.chomp.split("\n").size - 1 assert_include 'active', response.body assert_not_include 'locked', response.body - assert_equal 'text/csv; header=present', @response.content_type + assert_equal 'text/csv', @response.content_type end end @@ -84,7 +84,7 @@ class UsersControllerTest < Redmine::ControllerTest assert_equal User.logged.status(3).count, response.body.chomp.split("\n").size - 1 assert_include 'locked', response.body assert_not_include 'active', response.body - assert_equal 'text/csv; header=present', @response.content_type + assert_equal 'text/csv', @response.content_type end end @@ -94,7 +94,7 @@ class UsersControllerTest < Redmine::ControllerTest assert_equal User.logged.like('John').count, response.body.chomp.split("\n").size - 1 assert_include 'John', response.body - assert_equal 'text/csv; header=present', @response.content_type + assert_equal 'text/csv', @response.content_type end def test_index_csv_with_group_filter @@ -102,7 +102,7 @@ class UsersControllerTest < Redmine::ControllerTest assert_response :success assert_equal Group.find(10).users.count, response.body.chomp.split("\n").size - 1 - assert_equal 'text/csv; header=present', @response.content_type + assert_equal 'text/csv', @response.content_type end def test_show