diff options
author | Go MAEDA <maeda@farend.jp> | 2021-05-07 04:24:26 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2021-05-07 04:24:26 +0000 |
commit | b5b02f6ac44cbbcb29a9ece31d709dc371f0f9a4 (patch) | |
tree | d31035f36990ab1a79e7ad87ef9c6969ab9c8cc4 /test | |
parent | 53b8bf93dba40bc36c13f615ca3a012e80da9bf2 (diff) | |
download | redmine-b5b02f6ac44cbbcb29a9ece31d709dc371f0f9a4.tar.gz redmine-b5b02f6ac44cbbcb29a9ece31d709dc371f0f9a4.zip |
Use `Time.use_zone` instead of `Time.zone=` (#35208).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@20988 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/mailer_test.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index f31a35015..b25e17427 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -386,11 +386,10 @@ class MailerTest < ActiveSupport::TestCase issue = Issue.find(3) user = User.find(1) %w(UTC Paris Tokyo).each do |zone| - Time.zone = zone - assert_match /^redmine\.issue-3\.20060719190727\.1@example\.net/, Mailer.token_for(issue, user) + Time.use_zone(zone) do + assert_match /^redmine\.issue-3\.20060719190727\.1@example\.net/, Mailer.token_for(issue, user) + end end - ensure - Time.zone = zone_was end test "#issue_add should notify project members" do |