aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/integration_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/integration_test.rb')
-rw-r--r--activerecord/test/cases/integration_test.rb13
1 files changed, 4 insertions, 9 deletions
diff --git a/activerecord/test/cases/integration_test.rb b/activerecord/test/cases/integration_test.rb
index f5daca2fa8..406aacb056 100644
--- a/activerecord/test/cases/integration_test.rb
+++ b/activerecord/test/cases/integration_test.rb
@@ -23,17 +23,12 @@ class IntegrationTest < ActiveRecord::TestCase
end
def test_cache_key_for_existing_record_is_not_timezone_dependent
- ActiveRecord::Base.time_zone_aware_attributes = true
-
- Time.zone = 'UTC'
utc_key = Developer.first.cache_key
- Time.zone = 'EST'
- est_key = Developer.first.cache_key
-
- assert_equal utc_key, est_key
- ensure
- Time.zone = 'UTC'
+ with_timezone_config zone: "EST" do
+ est_key = Developer.first.cache_key
+ assert_equal utc_key, est_key
+ end
end
def test_cache_key_format_for_existing_record_with_updated_at