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.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/test/cases/integration_test.rb b/activerecord/test/cases/integration_test.rb
index 406aacb056..bceb96eac2 100644
--- a/activerecord/test/cases/integration_test.rb
+++ b/activerecord/test/cases/integration_test.rb
@@ -3,9 +3,10 @@ require 'models/company'
require 'models/developer'
require 'models/car'
require 'models/bulb'
+require 'models/owner'
class IntegrationTest < ActiveRecord::TestCase
- fixtures :companies, :developers
+ fixtures :companies, :developers, :owners
def test_to_param_should_return_string
assert_kind_of String, Client.first.to_param
@@ -81,4 +82,9 @@ class IntegrationTest < ActiveRecord::TestCase
dev.touch
assert_not_equal key, dev.cache_key
end
+
+ def test_named_timestamps_for_cache_key
+ owner = owners(:blackbeard)
+ assert_equal "owners/#{owner.id}-#{owner.happy_at.utc.to_s(:number)}", owner.cache_key(:updated_at, :happy_at)
+ end
end