Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-05-19 23:40:07 +02:00
Commits vergleichen
2 Commits
895ee9dd96
...
ca1aae4050
Autor | SHA1 | Datum | |
---|---|---|---|
ca1aae4050 | |||
140f11ecc6 |
|
@ -425,7 +425,7 @@ class CustomWizard::Action
|
|||
).perform
|
||||
end
|
||||
|
||||
if action['code']
|
||||
if action['code'].present?
|
||||
@submission.fields[action['code']] = SecureRandom.hex(8)
|
||||
url += "&#{action['code']}=#{@submission.fields[action['code']]}"
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
# name: discourse-custom-wizard
|
||||
# about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more.
|
||||
# version: 2.6.3
|
||||
# version: 2.6.4
|
||||
# authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos
|
||||
# url: https://github.com/paviliondev/discourse-custom-wizard
|
||||
# contact_emails: development@pavilion.tech
|
||||
|
|
|
@ -212,11 +212,23 @@ describe CustomWizard::Action do
|
|||
end
|
||||
end
|
||||
|
||||
it 're-routes a user' do
|
||||
wizard = CustomWizard::Builder.new(@template[:id], user).build
|
||||
updater = wizard.create_updater(wizard.steps.last.id, {})
|
||||
updater.update
|
||||
expect(updater.result[:redirect_on_next]).to eq("https://google.com")
|
||||
context "route to action" do
|
||||
it 're-routes a user' do
|
||||
wizard = CustomWizard::Builder.new(@template[:id], user).build
|
||||
updater = wizard.create_updater(wizard.steps.last.id, {})
|
||||
updater.update
|
||||
expect(updater.result[:redirect_on_next]).to eq("https://google.com")
|
||||
end
|
||||
|
||||
it "works if the code field has a blank string" do
|
||||
wizard_template[:actions].last[:code] = " "
|
||||
update_template(wizard_template)
|
||||
|
||||
wizard = CustomWizard::Builder.new(@template[:id], user).build
|
||||
updater = wizard.create_updater(wizard.steps.last.id, {})
|
||||
updater.update
|
||||
expect(updater.result[:redirect_on_next]).to eq("https://google.com")
|
||||
end
|
||||
end
|
||||
|
||||
context "standard subscription actions" do
|
||||
|
|
Laden …
In neuem Issue referenzieren