Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/sidebars/projects/menus')
-rw-r--r--spec/lib/sidebars/projects/menus/repository_menu_spec.rb2
-rw-r--r--spec/lib/sidebars/projects/menus/scope_menu_spec.rb6
-rw-r--r--spec/lib/sidebars/projects/menus/shimo_menu_spec.rb44
3 files changed, 1 insertions, 51 deletions
diff --git a/spec/lib/sidebars/projects/menus/repository_menu_spec.rb b/spec/lib/sidebars/projects/menus/repository_menu_spec.rb
index 1aa0ea30d0a..b29427d68dd 100644
--- a/spec/lib/sidebars/projects/menus/repository_menu_spec.rb
+++ b/spec/lib/sidebars/projects/menus/repository_menu_spec.rb
@@ -112,7 +112,7 @@ RSpec.describe Sidebars::Projects::Menus::RepositoryMenu, feature_category: :sou
end
end
- describe 'Contributor statistics' do
+ describe 'Contributor analytics' do
let_it_be(:item_id) { :contributors }
context 'when analytics is disabled' do
diff --git a/spec/lib/sidebars/projects/menus/scope_menu_spec.rb b/spec/lib/sidebars/projects/menus/scope_menu_spec.rb
index 108a98e28a4..fb1ec94dfe8 100644
--- a/spec/lib/sidebars/projects/menus/scope_menu_spec.rb
+++ b/spec/lib/sidebars/projects/menus/scope_menu_spec.rb
@@ -25,10 +25,4 @@ RSpec.describe Sidebars::Projects::Menus::ScopeMenu, feature_category: :navigati
specify { is_expected.to match(hash_including(class: 'shortcuts-project')) }
end
-
- describe '#extra_nav_link_html_options' do
- subject { described_class.new(context).extra_nav_link_html_options }
-
- specify { is_expected.to match(hash_including(class: 'context-header has-tooltip', title: context.project.name)) }
- end
end
diff --git a/spec/lib/sidebars/projects/menus/shimo_menu_spec.rb b/spec/lib/sidebars/projects/menus/shimo_menu_spec.rb
deleted file mode 100644
index e74647894fa..00000000000
--- a/spec/lib/sidebars/projects/menus/shimo_menu_spec.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe Sidebars::Projects::Menus::ShimoMenu do
- let_it_be_with_reload(:project) { create(:project) }
-
- let(:context) { Sidebars::Projects::Context.new(current_user: project.first_owner, container: project) }
-
- subject(:shimo_menu) { described_class.new(context) }
-
- describe '#render?' do
- context 'without a valid Shimo integration' do
- it "doesn't render the menu" do
- expect(shimo_menu.render?).to be_falsey
- end
- end
-
- context 'with a valid Shimo integration' do
- let_it_be_with_reload(:shimo_integration) { create(:shimo_integration, project: project) }
-
- context 'when integration is active' do
- it 'renders the menu' do
- expect(shimo_menu.render?).to eq true
- end
-
- it 'renders menu link' do
- expected_url = Rails.application.routes.url_helpers.project_integrations_shimo_path(project)
- expect(shimo_menu.link).to eq expected_url
- end
- end
-
- context 'when integration is inactive' do
- before do
- shimo_integration.update!(active: false)
- end
-
- it "doesn't render the menu" do
- expect(shimo_menu.render?).to eq false
- end
- end
- end
- end
-end