Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/groups/crm/organizations_controller_spec.rb')
-rw-r--r--spec/requests/groups/crm/organizations_controller_spec.rb16
1 files changed, 11 insertions, 5 deletions
diff --git a/spec/requests/groups/crm/organizations_controller_spec.rb b/spec/requests/groups/crm/organizations_controller_spec.rb
index 7595950350d..f38300c3c5b 100644
--- a/spec/requests/groups/crm/organizations_controller_spec.rb
+++ b/spec/requests/groups/crm/organizations_controller_spec.rb
@@ -24,7 +24,7 @@ RSpec.describe Groups::Crm::OrganizationsController do
shared_examples 'ok response with index template if authorized' do
context 'private group' do
- let(:group) { create(:group, :private) }
+ let(:group) { create(:group, :private, :crm_enabled) }
context 'with authorized user' do
before do
@@ -32,11 +32,17 @@ RSpec.describe Groups::Crm::OrganizationsController do
sign_in(user)
end
- context 'when feature flag is enabled' do
+ context 'when crm_enabled is true' do
it_behaves_like 'ok response with index template'
end
- context 'when feature flag is not enabled' do
+ context 'when crm_enabled is false' do
+ let(:group) { create(:group, :private) }
+
+ it_behaves_like 'response with 404 status'
+ end
+
+ context 'when feature flag is disabled' do
before do
stub_feature_flags(customer_relations: false)
end
@@ -64,10 +70,10 @@ RSpec.describe Groups::Crm::OrganizationsController do
end
context 'public group' do
- let(:group) { create(:group, :public) }
+ let(:group) { create(:group, :public, :crm_enabled) }
context 'with anonymous user' do
- it_behaves_like 'ok response with index template'
+ it_behaves_like 'response with 404 status'
end
end
end