1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-07 08:01:31 +00:00

Fix that test_issue_due_date_details fails depending on time zone (#31499).

Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@18238 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2019-06-09 03:43:43 +00:00
parent 299f7a40b7
commit 37b7578f0f

View File

@ -333,14 +333,16 @@ class IssuesHelperTest < Redmine::HelperTest
end
def test_issue_due_date_details
travel_to DateTime.parse('2019-06-01') do
travel_to Time.parse('2019-06-01 23:00:00 UTC') do
User.current = User.first
User.current.pref.update_attribute :time_zone, 'UTC'
issue = Issue.generate!
# due date is not set
assert_nil issue_due_date_details(issue)
# due date is set
issue.due_date = 5.days.from_now
issue.due_date = User.current.today + 5
issue.save!
assert_equal '06/06/2019 (Due in 5 days)', issue_due_date_details(issue)