diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-20 12:40:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-20 12:40:42 +0300 |
commit | ee664acb356f8123f4f6b00b73c1e1cf0866c7fb (patch) | |
tree | f8479f94a28f66654c6a4f6fb99bad6b4e86a40e /spec/lib/sidebars/projects/menus/analytics_menu_spec.rb | |
parent | 62f7d5c5b69180e82ae8196b7b429eeffc8e7b4f (diff) |
Add latest changes from gitlab-org/gitlab@15-5-stable-eev15.5.0-rc42
Diffstat (limited to 'spec/lib/sidebars/projects/menus/analytics_menu_spec.rb')
-rw-r--r-- | spec/lib/sidebars/projects/menus/analytics_menu_spec.rb | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/spec/lib/sidebars/projects/menus/analytics_menu_spec.rb b/spec/lib/sidebars/projects/menus/analytics_menu_spec.rb index 25a65015847..878da747abe 100644 --- a/spec/lib/sidebars/projects/menus/analytics_menu_spec.rb +++ b/spec/lib/sidebars/projects/menus/analytics_menu_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe Sidebars::Projects::Menus::AnalyticsMenu do - let_it_be(:project) { create(:project, :repository) } + let_it_be_with_refind(:project) { create(:project, :repository) } let_it_be(:guest) do create(:user).tap { |u| project.add_guest(u) } end @@ -125,6 +125,34 @@ RSpec.describe Sidebars::Projects::Menus::AnalyticsMenu do specify { is_expected.to be_nil } end + + describe 'when issues are disabled' do + before do + project.issues_enabled = false + project.save! + end + + specify { is_expected.not_to be_nil } + end + + describe 'when merge requests are disabled' do + before do + project.merge_requests_enabled = false + project.save! + end + + specify { is_expected.not_to be_nil } + end + + describe 'when the issues and merge requests are disabled' do + before do + project.issues_enabled = false + project.merge_requests_enabled = false + project.save! + end + + specify { is_expected.to be_nil } + end end end end |