diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-13 03:08:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-13 03:08:46 +0300 |
commit | 47d1f417f03aca055b2ba49c32bb6fb01c459831 (patch) | |
tree | 200f05f28369cbf3a34abcb4a3c388558268b86f /spec/controllers | |
parent | 006e89697dd5165f355afc20fc6bb0cdfa7b381a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects/settings/operations_controller_spec.rb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/spec/controllers/projects/settings/operations_controller_spec.rb b/spec/controllers/projects/settings/operations_controller_spec.rb index 667a6336952..0a2cc6f6aa5 100644 --- a/spec/controllers/projects/settings/operations_controller_spec.rb +++ b/spec/controllers/projects/settings/operations_controller_spec.rb @@ -196,6 +196,39 @@ describe Projects::Settings::OperationsController do end end + context 'prometheus integration' do + describe 'PATCH #update' do + let(:params) do + { + prometheus_integration_attributes: { + manual_configuration: '0', + api_url: 'https://gitlab.prometheus.rocks' + } + } + end + + context 'feature flag :settings_operations_prometheus_service is enabled' do + before do + stub_feature_flags(settings_operations_prometheus_service: true) + end + + it_behaves_like 'PATCHable' + end + + context 'feature flag :settings_operations_prometheus_service is disabled' do + before do + stub_feature_flags(settings_operations_prometheus_service: false) + end + + it_behaves_like 'PATCHable' do + let(:permitted_params) do + ActionController::Parameters.new(params.except(:prometheus_integration_attributes)).permit! + end + end + end + end + end + private def project_params(project, params = {}) |