summaryrefslogtreecommitdiff
path: root/spec/controllers/projects/environments_controller_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-02-17 12:11:17 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-02-17 12:11:17 +0000
commit4f8983ade80c0d71d4c8e6cc0d686c9cecf5e7d4 (patch)
tree3c51e09d9315acb8930c3c5383fb6384a3a841aa /spec/controllers/projects/environments_controller_spec.rb
parente191aabc8fd068233ac7b21e6f1299e2c371faba (diff)
downloadgitlab-ce-4f8983ade80c0d71d4c8e6cc0d686c9cecf5e7d4.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/projects/environments_controller_spec.rb')
-rw-r--r--spec/controllers/projects/environments_controller_spec.rb26
1 files changed, 6 insertions, 20 deletions
diff --git a/spec/controllers/projects/environments_controller_spec.rb b/spec/controllers/projects/environments_controller_spec.rb
index 48e58cc0e38..169fed1ab17 100644
--- a/spec/controllers/projects/environments_controller_spec.rb
+++ b/spec/controllers/projects/environments_controller_spec.rb
@@ -104,30 +104,16 @@ RSpec.describe Projects::EnvironmentsController, feature_category: :continuous_d
end
context 'can access stop stale environments feature' do
- context 'when stop_stale_environments FF is enabled' do
- it 'maintainers can access the feature' do
- get :index, params: environment_params(format: :json)
-
- expect(json_response['can_stop_stale_environments']).to be_truthy
- end
-
- context 'when user is a reporter' do
- let(:user) { reporter }
+ it 'maintainers can access the feature' do
+ get :index, params: environment_params(format: :json)
- it 'reporters cannot access the feature' do
- get :index, params: environment_params(format: :json)
-
- expect(json_response['can_stop_stale_environments']).to be_falsey
- end
- end
+ expect(json_response['can_stop_stale_environments']).to be_truthy
end
- context 'when stop_stale_environments FF is disabled' do
- before do
- stub_feature_flags(stop_stale_environments: false)
- end
+ context 'when user is a reporter' do
+ let(:user) { reporter }
- it 'maintainers cannot access the feature' do
+ it 'reporters cannot access the feature' do
get :index, params: environment_params(format: :json)
expect(json_response['can_stop_stale_environments']).to be_falsey