Permalink
Browse files

Merge pull request #8201 from nikitug/regression_test_on_ar_cache_key…

…_precision

Add a regression test on #8195
  • Loading branch information...
2 parents c940aa6 + ff2973a commit 12990c4e61d06a4b86f918b51a6702fe342d2736 @rafaelfranca rafaelfranca committed Nov 13, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 activerecord/test/cases/base_test.rb
@@ -1442,6 +1442,13 @@ def test_cache_key_format_for_existing_record_with_nil_updated_at
assert_match(/\/#{dev.id}$/, dev.cache_key)
end
+ def test_cache_key_format_is_precise_enough
+ dev = Developer.first
+ key = dev.cache_key
+ dev.touch
+ assert_not_equal key, dev.cache_key
+ end
+
def test_uniq_delegates_to_scoped
scope = stub
Bird.stubs(:all).returns(mock(:uniq => scope))

0 comments on commit 12990c4

Please sign in to comment.