diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-23 21:12:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-23 21:12:49 +0300 |
commit | fee19ef336bc64155e0d9e8697834ff529bb6d93 (patch) | |
tree | 44495c315182e298b14b0a440071d2b91a7b7c91 /spec/views | |
parent | 0e6ce73070a9816db513ba360620699232c517d7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views')
-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 |