2020-09-04 18:08:48 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-11-06 03:09:19 +00:00
|
|
|
RSpec.describe 'registrations/welcome/show' do
|
2021-05-12 18:10:35 +00:00
|
|
|
let_it_be(:user) { create(:user) }
|
2020-09-04 18:08:48 +00:00
|
|
|
|
|
|
|
before do
|
|
|
|
allow(view).to receive(:current_user).and_return(user)
|
|
|
|
allow(view).to receive(:in_subscription_flow?).and_return(false)
|
|
|
|
allow(view).to receive(:in_trial_flow?).and_return(false)
|
2021-03-29 03:09:08 +00:00
|
|
|
allow(view).to receive(:user_has_memberships?).and_return(false)
|
2020-09-04 18:08:48 +00:00
|
|
|
allow(view).to receive(:in_oauth_flow?).and_return(false)
|
|
|
|
|
|
|
|
render
|
|
|
|
end
|
|
|
|
|
|
|
|
subject { rendered }
|
|
|
|
|
|
|
|
it { is_expected.not_to have_selector('label[for="user_setup_for_company"]') }
|
|
|
|
it { is_expected.to have_button('Get started!') }
|
2021-07-20 18:08:46 +00:00
|
|
|
it { is_expected.not_to have_selector('input[name="user[email_opted_in]"]') }
|
2020-09-04 18:08:48 +00:00
|
|
|
end
|