mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 00:32:52 +08:00
SECURITY: Run custom field validations with save_custom_fields
This commit is contained in:

committed by
Isaac Janzen

parent
fd4ff92892
commit
4494d62531
@ -406,6 +406,7 @@ RSpec.describe HasCustomFields do
|
||||
|
||||
test_item.custom_fields = { "foo" => "aa" }
|
||||
expect { test_item.save! }.to raise_error(ActiveRecord::RecordInvalid)
|
||||
expect { test_item.save_custom_fields }.to raise_error(ActiveRecord::RecordInvalid)
|
||||
end
|
||||
|
||||
describe "upsert_custom_fields" do
|
||||
|
Reference in New Issue
Block a user