1
0
Fork 0

IMPROVE: separate out new tests

Dieser Commit ist enthalten in:
merefield 2023-03-10 14:42:42 +00:00
Ursprung 148e188490
Commit b73437299c

Datei anzeigen

@ -131,9 +131,6 @@ describe CustomWizard::Wizard do
expect(
CustomWizard::Wizard.new(@permitted_template, trusted_user).permitted?
).to eq(true)
expect(
CustomWizard::Wizard.new(@guests_permitted_template, trusted_user).permitted?
).to eq(true)
end
it "permits everyone if everyone is permitted" do
@ -206,6 +203,30 @@ describe CustomWizard::Wizard do
end
end
context "with subscription and guest wizard" do
before do
enable_subscription("standard")
end
it "permits admins" do
expect(
CustomWizard::Wizard.new(@guests_permitted_template, admin_user).permitted?
).to eq(true)
end
it "permits regular users" do
expect(
CustomWizard::Wizard.new(@guests_permitted_template, user).permitted?
).to eq(true)
end
it "permits guests" do
expect(
CustomWizard::Wizard.new(@guests_permitted_template, nil, "guest123").permitted?
).to eq(true)
end
end
context "submissions" do
before do
CustomWizard::Submission.new(@wizard, step_1_field_1: "I am a user submission").save