Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-14 13:52:54 +01:00
16 Zeilen
597 B
Ruby
16 Zeilen
597 B
Ruby
# frozen_string_literal: true
|
|
|
|
describe InvitesControllerCustomWizard, type: :request do
|
|
fab!(:topic)
|
|
let(:invite) { Invite.generate(topic.user, email: "angus@mcleod.org", topic: topic) }
|
|
let(:template) { get_wizard_fixture("wizard") }
|
|
|
|
before { @controller = InvitesController.new }
|
|
|
|
it "redirects a user to wizard after invite if after signup is enabled" do
|
|
template["after_signup"] = true
|
|
CustomWizard::Template.save(template, skip_jobs: true)
|
|
put "/invites/show/#{invite.invite_key}.json"
|
|
expect(cookies[:destination_url]).to eq("/w/super-mega-fun-wizard")
|
|
end
|
|
end
|