diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-08-26 02:17:36 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-08-26 02:17:36 -0700 |
commit | 0c7bbc72fc043ad5debbff34da81f3d68f516d3f (patch) | |
tree | f0857fdc466f0064370ae00e1cd53845e879f8d6 | |
parent | b319e69ecb06692995664dba263813d99bc2145f (diff) | |
download | rails-0c7bbc72fc043ad5debbff34da81f3d68f516d3f.tar.gz rails-0c7bbc72fc043ad5debbff34da81f3d68f516d3f.tar.bz2 rails-0c7bbc72fc043ad5debbff34da81f3d68f516d3f.zip |
fix tests relying on implicit ordering
-rw-r--r-- | activerecord/test/cases/query_cache_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/test/cases/query_cache_test.rb b/activerecord/test/cases/query_cache_test.rb index eae2104531..171d0e6dae 100644 --- a/activerecord/test/cases/query_cache_test.rb +++ b/activerecord/test/cases/query_cache_test.rb @@ -116,8 +116,9 @@ class QueryCacheExpiryTest < ActiveRecord::TestCase def test_cache_is_expired_by_habtm_delete ActiveRecord::Base.connection.expects(:clear_query_cache).times(2) ActiveRecord::Base.cache do - c = Category.find(:first) - p = Post.find(:first) + c = Category.find(1) + p = Post.find(1) + assert p.categories.any? p.categories.delete_all end end |