diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
commit | 43a25d93ebdabea52f99b05e15b06250cd8f07d7 (patch) | |
tree | dceebdc68925362117480a5d672bcff122fb625b /spec/requests/projects/metrics/dashboards/builder_spec.rb | |
parent | 20c84b99005abd1c82101dfeff264ac50d2df211 (diff) |
Add latest changes from gitlab-org/gitlab@16-0-stable-eev16.0.0-rc42
Diffstat (limited to 'spec/requests/projects/metrics/dashboards/builder_spec.rb')
-rw-r--r-- | spec/requests/projects/metrics/dashboards/builder_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/requests/projects/metrics/dashboards/builder_spec.rb b/spec/requests/projects/metrics/dashboards/builder_spec.rb index c929beaed70..8af2d1f1d25 100644 --- a/spec/requests/projects/metrics/dashboards/builder_spec.rb +++ b/spec/requests/projects/metrics/dashboards/builder_spec.rb @@ -49,6 +49,10 @@ RSpec.describe 'Projects::Metrics::Dashboards::BuilderController', feature_categ end describe 'POST /:namespace/:project/-/metrics/dashboards/builder' do + before do + stub_feature_flags(remove_monitor_metrics: false) + end + context 'as anonymous user' do it 'redirects user to sign in page' do send_request @@ -102,6 +106,18 @@ RSpec.describe 'Projects::Metrics::Dashboards::BuilderController', feature_categ expect(json_response['message']).to eq('Invalid configuration format') end end + + context 'when metrics dashboard feature is unavailable' do + before do + stub_feature_flags(remove_monitor_metrics: true) + end + + it 'returns not found' do + send_request + + expect(response).to have_gitlab_http_status(:not_found) + end + end end end end |