mirror of
https://github.com/redmine/redmine.git
synced 2025-11-07 22:05:56 +01:00
Update Rails to 5.2.3 (#31113).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@18028 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
2
Gemfile
2
Gemfile
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
|
|||||||
|
|
||||||
gem "bundler", ">= 1.5.0"
|
gem "bundler", ">= 1.5.0"
|
||||||
|
|
||||||
gem "rails", "5.2.2.1"
|
gem "rails", "5.2.3"
|
||||||
gem "rouge", "~> 3.3.0"
|
gem "rouge", "~> 3.3.0"
|
||||||
gem "request_store", "1.0.5"
|
gem "request_store", "1.0.5"
|
||||||
gem "mini_mime", "~> 1.0.1"
|
gem "mini_mime", "~> 1.0.1"
|
||||||
|
|||||||
@@ -639,7 +639,7 @@ class IssuesControllerTest < Redmine::ControllerTest
|
|||||||
}
|
}
|
||||||
assert_response :success
|
assert_response :success
|
||||||
|
|
||||||
assert_equal 'text/csv; header=present', @response.content_type
|
assert_equal 'text/csv', @response.content_type
|
||||||
assert response.body.starts_with?("#,")
|
assert response.body.starts_with?("#,")
|
||||||
lines = response.body.chomp.split("\n")
|
lines = response.body.chomp.split("\n")
|
||||||
# default columns + id and project
|
# default columns + id and project
|
||||||
@@ -653,7 +653,7 @@ class IssuesControllerTest < Redmine::ControllerTest
|
|||||||
}
|
}
|
||||||
assert_response :success
|
assert_response :success
|
||||||
|
|
||||||
assert_equal 'text/csv; header=present', @response.content_type
|
assert_equal 'text/csv', @response.content_type
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_index_csv_without_any_filters
|
def test_index_csv_without_any_filters
|
||||||
@@ -681,7 +681,7 @@ class IssuesControllerTest < Redmine::ControllerTest
|
|||||||
assert_response :success
|
assert_response :success
|
||||||
end
|
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(',')
|
headers = response.body.chomp.split("\n").first.split(',')
|
||||||
assert_include 'Description', headers
|
assert_include 'Description', headers
|
||||||
assert_include 'test_index_csv_with_description', response.body
|
assert_include 'test_index_csv_with_description', response.body
|
||||||
@@ -697,7 +697,7 @@ class IssuesControllerTest < Redmine::ControllerTest
|
|||||||
:c => %w(subject spent_hours)
|
:c => %w(subject spent_hours)
|
||||||
}
|
}
|
||||||
assert_response :success
|
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")
|
lines = @response.body.chomp.split("\n")
|
||||||
assert_include "#{issue.id},#{issue.subject},7.33", lines
|
assert_include "#{issue.id},#{issue.subject},7.33", lines
|
||||||
end
|
end
|
||||||
@@ -709,7 +709,7 @@ class IssuesControllerTest < Redmine::ControllerTest
|
|||||||
}
|
}
|
||||||
assert_response :success
|
assert_response :success
|
||||||
|
|
||||||
assert_equal 'text/csv; header=present', @response.content_type
|
assert_equal 'text/csv', @response.content_type
|
||||||
assert_match /\A#,/, response.body
|
assert_match /\A#,/, response.body
|
||||||
lines = response.body.chomp.split("\n")
|
lines = response.body.chomp.split("\n")
|
||||||
assert_equal IssueQuery.new.available_inline_columns.size, lines[0].split(',').size
|
assert_equal IssueQuery.new.available_inline_columns.size, lines[0].split(',').size
|
||||||
@@ -781,7 +781,7 @@ class IssuesControllerTest < Redmine::ControllerTest
|
|||||||
:subject => str_utf8,
|
:subject => str_utf8,
|
||||||
:format => 'csv'
|
:format => 'csv'
|
||||||
}
|
}
|
||||||
assert_equal 'text/csv; header=present', @response.content_type
|
assert_equal 'text/csv', @response.content_type
|
||||||
lines = @response.body.chomp.split("\n")
|
lines = @response.body.chomp.split("\n")
|
||||||
header = lines[0]
|
header = lines[0]
|
||||||
status = (+"\xaa\xac\xbaA").force_encoding('Big5')
|
status = (+"\xaa\xac\xbaA").force_encoding('Big5')
|
||||||
@@ -803,7 +803,7 @@ class IssuesControllerTest < Redmine::ControllerTest
|
|||||||
:format => 'csv',
|
:format => 'csv',
|
||||||
:set_filter => 1
|
: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")
|
lines = @response.body.chomp.split("\n")
|
||||||
header = lines[0]
|
header = lines[0]
|
||||||
issue_line = lines.find {|l| l =~ /^#{issue.id},/}
|
issue_line = lines.find {|l| l =~ /^#{issue.id},/}
|
||||||
@@ -827,7 +827,7 @@ class IssuesControllerTest < Redmine::ControllerTest
|
|||||||
:format => 'csv',
|
:format => 'csv',
|
||||||
:set_filter => 1
|
: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")
|
lines = @response.body.chomp.split("\n")
|
||||||
assert_include "#{issue.id},1234.50,#{str1}", lines
|
assert_include "#{issue.id},1234.50,#{str1}", lines
|
||||||
end
|
end
|
||||||
@@ -845,7 +845,7 @@ class IssuesControllerTest < Redmine::ControllerTest
|
|||||||
:format => 'csv',
|
:format => 'csv',
|
||||||
:set_filter => 1
|
: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")
|
lines = @response.body.chomp.split("\n")
|
||||||
assert_include "#{issue.id};1234,50;#{str1}", lines
|
assert_include "#{issue.id};1234,50;#{str1}", lines
|
||||||
end
|
end
|
||||||
@@ -1313,7 +1313,7 @@ class IssuesControllerTest < Redmine::ControllerTest
|
|||||||
:format => 'csv'
|
:format => 'csv'
|
||||||
}
|
}
|
||||||
assert_response :success
|
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")
|
lines = response.body.chomp.split("\n")
|
||||||
assert_include '1,"Related to #7, Related to #8, Blocks #11"', lines
|
assert_include '1,"Related to #7, Related to #8, Blocks #11"', lines
|
||||||
assert_include '2,Blocked by #12', lines
|
assert_include '2,Blocked by #12', lines
|
||||||
|
|||||||
@@ -1350,7 +1350,7 @@ class TimelogControllerTest < Redmine::ControllerTest
|
|||||||
with_settings :date_format => '%m/%d/%Y' do
|
with_settings :date_format => '%m/%d/%Y' do
|
||||||
get :index, :params => {:format => 'csv'}
|
get :index, :params => {:format => 'csv'}
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_equal 'text/csv; header=present', response.content_type
|
assert_equal 'text/csv', response.content_type
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1358,7 +1358,7 @@ class TimelogControllerTest < Redmine::ControllerTest
|
|||||||
with_settings :date_format => '%m/%d/%Y' do
|
with_settings :date_format => '%m/%d/%Y' do
|
||||||
get :index, :params => {:project_id => 1, :format => 'csv'}
|
get :index, :params => {:project_id => 1, :format => 'csv'}
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_equal 'text/csv; header=present', response.content_type
|
assert_equal 'text/csv', response.content_type
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ class TimelogReportTest < Redmine::ControllerTest
|
|||||||
:format => "csv"
|
:format => "csv"
|
||||||
}
|
}
|
||||||
assert_response :success
|
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")
|
lines = @response.body.chomp.split("\n")
|
||||||
# Headers
|
# Headers
|
||||||
assert_equal 'Project,User,Activity,2007-3,2007-4,Total time', lines.first
|
assert_equal 'Project,User,Activity,2007-3,2007-4,Total time', lines.first
|
||||||
@@ -251,7 +251,7 @@ class TimelogReportTest < Redmine::ControllerTest
|
|||||||
:format => "csv"
|
:format => "csv"
|
||||||
}
|
}
|
||||||
assert_response :success
|
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")
|
lines = @response.body.chomp.split("\n")
|
||||||
# Headers
|
# Headers
|
||||||
assert_equal 'Project,User,Activity,2007-3,2007-4,Total time', lines.first
|
assert_equal 'Project,User,Activity,2007-3,2007-4,Total time', lines.first
|
||||||
@@ -289,7 +289,7 @@ class TimelogReportTest < Redmine::ControllerTest
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
assert_response :success
|
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")
|
lines = @response.body.chomp.split("\n")
|
||||||
# Headers
|
# Headers
|
||||||
s1 = (+"\xa5\xce\xa4\xe1,2011-11-11,\xa4u\xae\xc9\xc1`\xadp").force_encoding('Big5')
|
s1 = (+"\xa5\xce\xa4\xe1,2011-11-11,\xa4u\xae\xc9\xc1`\xadp").force_encoding('Big5')
|
||||||
@@ -334,7 +334,7 @@ class TimelogReportTest < Redmine::ControllerTest
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
assert_response :success
|
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")
|
lines = @response.body.chomp.split("\n")
|
||||||
# Headers
|
# Headers
|
||||||
s1 = (+"\xa5\xce\xa4\xe1,2011-11-11,\xa4u\xae\xc9\xc1`\xadp").force_encoding('Big5')
|
s1 = (+"\xa5\xce\xa4\xe1,2011-11-11,\xa4u\xae\xc9\xc1`\xadp").force_encoding('Big5')
|
||||||
@@ -369,7 +369,7 @@ class TimelogReportTest < Redmine::ControllerTest
|
|||||||
:format => "csv"
|
:format => "csv"
|
||||||
}
|
}
|
||||||
assert_response :success
|
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")
|
lines = @response.body.chomp.split("\n")
|
||||||
# Headers
|
# Headers
|
||||||
s1 = (+"Utilisateur;2011-11-11;Temps total").force_encoding('ISO-8859-1')
|
s1 = (+"Utilisateur;2011-11-11;Temps total").force_encoding('ISO-8859-1')
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ class UsersControllerTest < Redmine::ControllerTest
|
|||||||
assert_equal User.logged.status(1).count, response.body.chomp.split("\n").size - 1
|
assert_equal User.logged.status(1).count, response.body.chomp.split("\n").size - 1
|
||||||
assert_include 'active', response.body
|
assert_include 'active', response.body
|
||||||
assert_not_include 'locked', 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
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ class UsersControllerTest < Redmine::ControllerTest
|
|||||||
assert_equal User.logged.status(3).count, response.body.chomp.split("\n").size - 1
|
assert_equal User.logged.status(3).count, response.body.chomp.split("\n").size - 1
|
||||||
assert_include 'locked', response.body
|
assert_include 'locked', response.body
|
||||||
assert_not_include 'active', 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
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ class UsersControllerTest < Redmine::ControllerTest
|
|||||||
|
|
||||||
assert_equal User.logged.like('John').count, response.body.chomp.split("\n").size - 1
|
assert_equal User.logged.like('John').count, response.body.chomp.split("\n").size - 1
|
||||||
assert_include 'John', response.body
|
assert_include 'John', response.body
|
||||||
assert_equal 'text/csv; header=present', @response.content_type
|
assert_equal 'text/csv', @response.content_type
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_index_csv_with_group_filter
|
def test_index_csv_with_group_filter
|
||||||
@@ -104,7 +104,7 @@ class UsersControllerTest < Redmine::ControllerTest
|
|||||||
assert_response :success
|
assert_response :success
|
||||||
|
|
||||||
assert_equal Group.find(10).users.count, response.body.chomp.split("\n").size - 1
|
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
|
end
|
||||||
|
|
||||||
def test_show
|
def test_show
|
||||||
|
|||||||
Reference in New Issue
Block a user