diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2018-08-28 16:30:15 -0400 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2018-08-28 16:31:15 -0400 |
commit | a8fff608148ad48e333b1f63b1d33df211bc658a (patch) | |
tree | dc9db550f59bdeadb1d65d3badd3c5f9df856575 /activejob/test/cases | |
parent | 538f42900f8c51a0fa1ad3a3f2e4be553b247994 (diff) | |
download | rails-a8fff608148ad48e333b1f63b1d33df211bc658a.tar.gz rails-a8fff608148ad48e333b1f63b1d33df211bc658a.tar.bz2 rails-a8fff608148ad48e333b1f63b1d33df211bc658a.zip |
Add test to make sure the custom object key can't be serialized
Diffstat (limited to 'activejob/test/cases')
-rw-r--r-- | activejob/test/cases/argument_serialization_test.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activejob/test/cases/argument_serialization_test.rb b/activejob/test/cases/argument_serialization_test.rb index e5f1f087fe..f07529d743 100644 --- a/activejob/test/cases/argument_serialization_test.rb +++ b/activejob/test/cases/argument_serialization_test.rb @@ -121,8 +121,10 @@ class ArgumentSerializationTest < ActiveSupport::TestCase end test "should not allow reserved hash keys" do - ["_aj_globalid", :_aj_globalid, "_aj_symbol_keys", :_aj_symbol_keys, - "_aj_hash_with_indifferent_access", :_aj_hash_with_indifferent_access].each do |key| + ["_aj_globalid", :_aj_globalid, + "_aj_symbol_keys", :_aj_symbol_keys, + "_aj_hash_with_indifferent_access", :_aj_hash_with_indifferent_access, + "_aj_serialized", :_aj_serialized].each do |key| assert_raises ActiveJob::SerializationError do ActiveJob::Arguments.serialize [key => 1] end |