Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-21 17:00:29 +01:00
DEV: use of as_json without only
no longer allowed
See https://meta.discourse.org/t/preventing-accidental-serialization-of-activerecord-models/314495
Dieser Commit ist enthalten in:
Ursprung
5deff6c640
Commit
247a3d551c
2 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen
|
@ -173,7 +173,7 @@ describe CustomWizard::Action do
|
|||
steps = wizard.steps
|
||||
wizard.create_updater(steps[0].id, {}).update
|
||||
wizard.create_updater(steps[1].id,
|
||||
step_2_field_7: upload.as_json
|
||||
step_2_field_7: upload.as_json(only: [:id, :url, :user_id])
|
||||
).update
|
||||
expect(user.profile_background_upload.id).to eq(upload.id)
|
||||
end
|
||||
|
|
|
@ -230,7 +230,9 @@ describe CustomWizard::Wizard do
|
|||
before do
|
||||
enable_subscription("standard")
|
||||
@wizard.restart_on_revisit = true
|
||||
CustomWizard::Template.save(@wizard.as_json)
|
||||
CustomWizard::Template.save(
|
||||
CustomWizard::WizardSerializer.new(@wizard, root: false).as_json
|
||||
)
|
||||
end
|
||||
|
||||
it "returns to step 1 if option to clear submissions on each visit is set" do
|
||||
|
|
Laden …
In neuem Issue referenzieren