Ensure caching works in cache tests for API controllers

This commit is contained in:
Matt-Yorkley
2020-05-05 18:44:48 +02:00
parent 61d7adaf74
commit 7e4c00ba3f

View File

@@ -11,8 +11,9 @@ module ApiActionCaching
include ActionController::Caching::Actions
include AbstractController::Layouts
# This config is not passed to the controller automatically with ActionController::Metal
# These configs are not assigned to the controller automatically with ActionController::Metal
self.cache_store = Rails.configuration.cache_store
self.perform_caching = ActionController::Base.perform_caching
# ActionController::Caching asks for a controller's layout, but they're not used in the API
layout false