diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 15:40:28 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 15:40:28 +0000 |
commit | b595cb0c1dec83de5bdee18284abe86614bed33b (patch) | |
tree | 8c3d4540f193c5ff98019352f554e921b3a41a72 /spec/lib/sidebars | |
parent | 2f9104a328fc8a4bddeaa4627b595166d24671d0 (diff) | |
download | gitlab-ce-b595cb0c1dec83de5bdee18284abe86614bed33b.tar.gz |
Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42
Diffstat (limited to 'spec/lib/sidebars')
-rw-r--r-- | spec/lib/sidebars/projects/menus/monitor_menu_spec.rb | 28 | ||||
-rw-r--r-- | spec/lib/sidebars/projects/menus/settings_menu_spec.rb | 19 |
2 files changed, 17 insertions, 30 deletions
diff --git a/spec/lib/sidebars/projects/menus/monitor_menu_spec.rb b/spec/lib/sidebars/projects/menus/monitor_menu_spec.rb index b11c9db4e46..ba5137e2b92 100644 --- a/spec/lib/sidebars/projects/menus/monitor_menu_spec.rb +++ b/spec/lib/sidebars/projects/menus/monitor_menu_spec.rb @@ -68,34 +68,6 @@ RSpec.describe Sidebars::Projects::Menus::MonitorMenu do it_behaves_like 'access rights checks' end - describe 'Logs' do - let(:item_id) { :logs } - - it_behaves_like 'access rights checks' - - context 'when feature disabled' do - before do - stub_feature_flags(monitor_logging: false) - end - - specify { is_expected.to be_nil } - end - end - - describe 'Tracing' do - let(:item_id) { :tracing } - - it_behaves_like 'access rights checks' - - context 'when feature disabled' do - before do - stub_feature_flags(monitor_tracing: false) - end - - specify { is_expected.to be_nil } - end - end - describe 'Error Tracking' do let(:item_id) { :error_tracking } diff --git a/spec/lib/sidebars/projects/menus/settings_menu_spec.rb b/spec/lib/sidebars/projects/menus/settings_menu_spec.rb index d6136dddf40..f41f7a01d88 100644 --- a/spec/lib/sidebars/projects/menus/settings_menu_spec.rb +++ b/spec/lib/sidebars/projects/menus/settings_menu_spec.rb @@ -135,18 +135,20 @@ RSpec.describe Sidebars::Projects::Menus::SettingsMenu do describe 'Packages & Registries' do let(:item_id) { :packages_and_registries } + let(:packages_enabled) { false } before do stub_container_registry_config(enabled: container_enabled) + stub_config(packages: { enabled: packages_enabled }) end - describe 'when config registry setting is disabled' do + describe 'when container registry setting is disabled' do let(:container_enabled) { false } specify { is_expected.to be_nil } end - describe 'when config registry setting is enabled' do + describe 'when container registry setting is enabled' do let(:container_enabled) { true } specify { is_expected.not_to be_nil } @@ -157,6 +159,19 @@ RSpec.describe Sidebars::Projects::Menus::SettingsMenu do specify { is_expected.to be_nil } end end + + describe 'when package registry setting is enabled' do + let(:container_enabled) { false } + let(:packages_enabled) { true } + + specify { is_expected.not_to be_nil } + + describe 'when the user does not have access' do + let(:user) { nil } + + specify { is_expected.to be_nil } + end + end end describe 'Usage Quotas' do |