Commit ac9c1def authored by maeda's avatar maeda

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

Patch by Go MAEDA.

git-svn-id: e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 16a68719
......@@ -333,14 +333,16 @@ class IssuesHelperTest < Redmine::HelperTest
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 = + 5!
assert_equal '06/06/2019 (Due in 5 days)', issue_due_date_details(issue)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment