diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2018-02-17 00:09:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-17 00:09:23 -0500 |
commit | 21cc0432e4e996383dce88ffb89c4883a577f459 (patch) | |
tree | 0da3486b6952c046f07b59fc6802b55cd7a9dd2e /railties | |
parent | 1f95e5b14d49390be7d0459e7479be985f499c86 (diff) | |
parent | 3cc93de6ad58ee306b906a3d979b46276900711a (diff) | |
download | rails-21cc0432e4e996383dce88ffb89c4883a577f459.tar.gz rails-21cc0432e4e996383dce88ffb89c4883a577f459.tar.bz2 rails-21cc0432e4e996383dce88ffb89c4883a577f459.zip |
Merge pull request #32002 from y-yagi/fix_set_serializer
Fix custome serializer setting
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/configuration_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 236d73d5fd..caadae3136 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -1940,6 +1940,18 @@ module ApplicationTests assert_equal Digest::SHA1, ActiveSupport::Digest.hash_digest_class end + test "custom serializers should be able to set via config.active_job.custom_serializers in an initializer" do + class ::DummySerializer < ActiveJob::Serializers::ObjectSerializer; end + + app_file "config/initializers/custom_serializers.rb", <<-RUBY + Rails.application.config.active_job.custom_serializers << DummySerializer + RUBY + + app "development" + + assert_includes ActiveJob::Serializers.serializers, DummySerializer + end + private def force_lazy_load_hooks yield # Tasty clarifying sugar, homie! We only need to reference a constant to load it. |