2016-08-06 12:50:17 -04:00
|
|
|
require "active_record_unit"
|
2015-08-28 01:31:54 -04:00
|
|
|
|
2016-10-28 23:05:58 -04:00
|
|
|
class RelationCacheTest < ActionView::TestCase
|
2015-08-28 01:31:54 -04:00
|
|
|
tests ActionView::Helpers::CacheHelper
|
|
|
|
|
|
|
|
def setup
|
2017-04-01 12:24:03 -04:00
|
|
|
@cache_hit = {}
|
2015-08-28 01:31:54 -04:00
|
|
|
@virtual_path = "path"
|
|
|
|
controller.cache_store = ActiveSupport::Cache::MemoryStore.new
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_cache_relation_other
|
2016-08-16 03:30:11 -04:00
|
|
|
cache(Project.all) { concat("Hello World") }
|
2017-05-18 12:12:32 -04:00
|
|
|
assert_equal "Hello World", controller.cache_store.read("views/path/projects-#{Project.count}")
|
2015-08-28 01:31:54 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def view_cache_dependencies; end
|
|
|
|
end
|