aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/activerecord
diff options
context:
space:
mode:
authorLachlan Sylvester <lachlan.sylvester@publicisfrontfoot.com.au>2015-08-28 15:31:54 +1000
committerLachlan Sylvester <lachlan.sylvester@publicisfrontfoot.com.au>2015-08-28 17:26:09 +1000
commita9c6a583b6ed4b6482652f98c2aeda1a60268fc9 (patch)
treeca19b76ec44c64a52d95e4ee5a60a75f09a61935 /actionview/test/activerecord
parent93a4dfaebc48e3324997be780539fad996349c84 (diff)
downloadrails-a9c6a583b6ed4b6482652f98c2aeda1a60268fc9.tar.gz
rails-a9c6a583b6ed4b6482652f98c2aeda1a60268fc9.tar.bz2
rails-a9c6a583b6ed4b6482652f98c2aeda1a60268fc9.zip
Fix calling cache helper with a relation
Diffstat (limited to 'actionview/test/activerecord')
-rw-r--r--actionview/test/activerecord/relation_cache_test.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/actionview/test/activerecord/relation_cache_test.rb b/actionview/test/activerecord/relation_cache_test.rb
new file mode 100644
index 0000000000..8e97417b94
--- /dev/null
+++ b/actionview/test/activerecord/relation_cache_test.rb
@@ -0,0 +1,18 @@
+require 'active_record_unit'
+
+class RelationCacheTest < ActionView::TestCase
+ tests ActionView::Helpers::CacheHelper
+
+ def setup
+ @virtual_path = "path"
+ controller.cache_store = ActiveSupport::Cache::MemoryStore.new
+ end
+
+ def test_cache_relation_other
+ cache(Project.all){ concat("Hello World") }
+ assert_equal "Hello World", controller.cache_store.read("views/projects-#{Project.count}/")
+ end
+
+ def view_cache_dependencies; end
+
+end