Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-24 10:20:28 +01:00
35021eb176
I've tweaked the subscription client gem so we can just use the gem's models and tables in this plugin's rspec, which makes duplicating and stubbing them unnecessary. See further https://github.com/paviliondev/discourse_subscription_client
17 Zeilen
501 B
Ruby
17 Zeilen
501 B
Ruby
# frozen_string_literal: true
|
|
|
|
describe CustomWizardUsersController, type: :request do
|
|
let(:template) { get_wizard_fixture("wizard") }
|
|
|
|
before do
|
|
@controller = UsersController.new
|
|
end
|
|
|
|
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")
|
|
end
|
|
end
|