mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add test to make sure the custom object key can't be serialized
This commit is contained in:
parent
538f42900f
commit
a8fff60814
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue