diff options
Diffstat (limited to 'spec/services/groups/create_service_spec.rb')
-rw-r--r-- | spec/services/groups/create_service_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/services/groups/create_service_spec.rb b/spec/services/groups/create_service_spec.rb index 7ea08131419..81cab973b30 100644 --- a/spec/services/groups/create_service_spec.rb +++ b/spec/services/groups/create_service_spec.rb @@ -24,6 +24,16 @@ RSpec.describe Groups::CreateService, '#execute' do end end + context 'when `setup_for_company:true` is passed' do + let(:params) { group_params.merge(setup_for_company: true) } + let(:service) { described_class.new(user, params) } + let(:created_group) { service.execute } + + it 'creates group with the specified setup_for_company' do + expect(created_group.setup_for_company).to eq(true) + end + end + context 'creating a group with `default_branch_protection` attribute' do let(:params) { group_params.merge(default_branch_protection: Gitlab::Access::PROTECTION_NONE) } let(:service) { described_class.new(user, params) } |