1
0
Fork 0

Merge branch 'main' into add-logs

Dieser Commit ist enthalten in:
Angus McLeod 2023-06-22 06:20:02 +02:00 committet von GitHub
Commit b4d23970bc
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 16 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -145,7 +145,7 @@ class CustomWizard::Wizard
step.last_step = true step.last_step = true
end end
if step.previous && step.previous.id === last_completed_step_id if !@restart_on_revisit && step.previous && step.previous.id === last_completed_step_id
@start = step.id @start = step.id
end end
end end

Datei anzeigen

@ -226,6 +226,21 @@ describe CustomWizard::Wizard do
end end
end end
context "with subscription and restart upon revisit" do
before do
enable_subscription("standard")
@wizard.restart_on_revisit = true
CustomWizard::Template.save(@wizard.as_json)
end
it "returns to step 1 if option to clear submissions on each visit is set" do
append_steps
expect(@wizard.unfinished?).to eq(true)
progress_step('step_1')
expect(@wizard.start).to eq('step_1')
end
end
context "with subscription and guest wizard" do context "with subscription and guest wizard" do
before do before do
enable_subscription("standard") enable_subscription("standard")