mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Replace load hook :active_model_serializers with :action_controller
This commit is contained in:
@@ -28,12 +28,6 @@ class RailtieTest < ActiveSupport::TestCase
|
||||
assert_equal ActionController::Base.cache_store, ActiveModelSerializers.config.cache_store
|
||||
assert_equal Rails.configuration.action_controller.perform_caching, ActiveModelSerializers.config.perform_caching
|
||||
end
|
||||
|
||||
test 'it runs the load hook' do
|
||||
loaded = false
|
||||
ActiveSupport.on_load(:active_model_serializers) { loaded = true }
|
||||
assert loaded
|
||||
end
|
||||
end
|
||||
|
||||
class WithoutRails < RailtieTest
|
||||
@@ -59,11 +53,5 @@ class RailtieTest < ActiveSupport::TestCase
|
||||
refute Rails.configuration.action_controller.perform_caching
|
||||
refute ActiveModelSerializers.config.perform_caching
|
||||
end
|
||||
|
||||
test "it hasn't run the load hook" do
|
||||
loaded = false
|
||||
ActiveSupport.on_load(:active_model_serializers) { loaded = true }
|
||||
refute loaded
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user