2021-03-11 07:30:15 +01:00
|
|
|
# frozen_string_literal: true
|
2020-11-03 01:24:20 +01:00
|
|
|
|
|
|
|
describe CustomWizardUsersController, type: :request do
|
2021-09-07 14:06:13 +02:00
|
|
|
let(:template) { get_wizard_fixture("wizard") }
|
2021-03-11 07:30:15 +01:00
|
|
|
|
2020-11-03 01:24:20 +01:00
|
|
|
before do
|
2023-09-28 14:47:22 +02:00
|
|
|
define_client_classes
|
2020-11-03 01:24:20 +01:00
|
|
|
@controller = UsersController.new
|
|
|
|
end
|
2021-03-11 07:30:15 +01:00
|
|
|
|
2020-11-03 01:24:20 +01:00
|
|
|
it "redirects a user to wizard after sign up if after signup is enabled" do
|
|
|
|
template['after_signup'] = true
|
|
|
|
CustomWizard::Template.save(template, skip_jobs: true)
|
|
|
|
sign_in(Fabricate(:user))
|
|
|
|
get "/u/account-created"
|
|
|
|
expect(response).to redirect_to("/w/super-mega-fun-wizard")
|
2021-03-11 07:30:15 +01:00
|
|
|
end
|
|
|
|
end
|