2020-09-04 14:08:48 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-11-05 22:09:19 -05:00
|
|
|
RSpec.describe 'registrations/welcome/show' do
|
2021-05-12 14:10:35 -04:00
|
|
|
let_it_be(:user) { create(:user) }
|
2020-09-04 14:08:48 -04: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-28 23:09:08 -04:00
|
|
|
allow(view).to receive(:user_has_memberships?).and_return(false)
|
2020-09-04 14:08:48 -04: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 14:08:46 -04:00
|
|
|
it { is_expected.not_to have_selector('input[name="user[email_opted_in]"]') }
|
2020-09-04 14:08:48 -04:00
|
|
|
end
|