Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 17:30:29 +01:00
added spec to verify functionality
Dieser Commit ist enthalten in:
Ursprung
dee3691cd0
Commit
89f733ae32
1 geänderte Dateien mit 10 neuen und 0 gelöschten Zeilen
|
@ -76,4 +76,14 @@ describe CustomWizard::WizardController do
|
||||||
put '/w/super-mega-fun-wizard/skip.json'
|
put '/w/super-mega-fun-wizard/skip.json'
|
||||||
expect(response.parsed_body['redirect_to']).to eq('/t/2')
|
expect(response.parsed_body['redirect_to']).to eq('/t/2')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "deletes the submission if user has filled up some data" do
|
||||||
|
@wizard = CustomWizard::Wizard.create(@template["id"], user)
|
||||||
|
CustomWizard::Submission.new(@wizard, step_1_field_1: "Hello World").save
|
||||||
|
current_submission = @wizard.current_submission
|
||||||
|
put '/w/super-mega-fun-wizard/skip.json'
|
||||||
|
list = CustomWizard::Submission.list(@wizard)
|
||||||
|
|
||||||
|
expect(list.any? { |submission| submission.id == current_submission.id }).to eq(false)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Laden …
In neuem Issue referenzieren