diff options
Diffstat (limited to 'spec/views/groups/new.html.haml_spec.rb')
-rw-r--r-- | spec/views/groups/new.html.haml_spec.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/views/groups/new.html.haml_spec.rb b/spec/views/groups/new.html.haml_spec.rb new file mode 100644 index 00000000000..8b12cc42a88 --- /dev/null +++ b/spec/views/groups/new.html.haml_spec.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe 'groups/new.html.haml' do + let_it_be(:user) { create(:user) } + let_it_be(:group) { build(:group, namespace_settings: build(:namespace_settings)) } + + before do + assign(:group, group) + assign(:current_user, user) + + allow(view).to receive(:current_user).and_return(user) + allow(view).to receive(:captcha_required?).and_return(false) + allow(view).to receive(:import_sources_enabled?).and_return(false) + + render + end + + describe 'setup_for_company field' do + it 'does not have a default selection', :aggregate_failures do + expect(rendered).to have_field('My company or team') + expect(rendered).not_to have_checked_field('My company or team') + expect(rendered).to have_field('Just me') + expect(rendered).not_to have_checked_field('Just me') + end + end +end |