summaryrefslogtreecommitdiff
path: root/spec/views/layouts/nav/sidebar
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-20 12:26:25 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-20 12:26:25 +0000
commita09983ae35713f5a2bbb100981116d31ce99826e (patch)
tree2ee2af7bd104d57086db360a7e6d8c9d5d43667a /spec/views/layouts/nav/sidebar
parent18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff)
downloadgitlab-ce-a09983ae35713f5a2bbb100981116d31ce99826e.tar.gz
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'spec/views/layouts/nav/sidebar')
-rw-r--r--spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb2
-rw-r--r--spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb2
-rw-r--r--spec/views/layouts/nav/sidebar/_instance_statistics.html.haml_spec.rb2
-rw-r--r--spec/views/layouts/nav/sidebar/_profile.html.haml_spec.rb2
-rw-r--r--spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb36
5 files changed, 38 insertions, 6 deletions
diff --git a/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb
index 2f8a75a81c8..d1e756422d5 100644
--- a/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb
+++ b/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-describe 'layouts/nav/sidebar/_admin' do
+RSpec.describe 'layouts/nav/sidebar/_admin' do
shared_examples 'page has active tab' do |title|
it "activates #{title} tab" do
render
diff --git a/spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb
index 24b66a0e767..b3c8450fb48 100644
--- a/spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb
+++ b/spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-describe 'layouts/nav/sidebar/_group' do
+RSpec.describe 'layouts/nav/sidebar/_group' do
let(:group) { create(:group) }
before do
diff --git a/spec/views/layouts/nav/sidebar/_instance_statistics.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_instance_statistics.html.haml_spec.rb
index 7f7f5637035..d3b57f6dfcf 100644
--- a/spec/views/layouts/nav/sidebar/_instance_statistics.html.haml_spec.rb
+++ b/spec/views/layouts/nav/sidebar/_instance_statistics.html.haml_spec.rb
@@ -2,6 +2,6 @@
require 'spec_helper'
-describe 'layouts/nav/sidebar/_instance_statistics' do
+RSpec.describe 'layouts/nav/sidebar/_instance_statistics' do
it_behaves_like 'has nav sidebar'
end
diff --git a/spec/views/layouts/nav/sidebar/_profile.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_profile.html.haml_spec.rb
index 6b820ab0b4c..0f6dcf8e57f 100644
--- a/spec/views/layouts/nav/sidebar/_profile.html.haml_spec.rb
+++ b/spec/views/layouts/nav/sidebar/_profile.html.haml_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-describe 'layouts/nav/sidebar/_profile' do
+RSpec.describe 'layouts/nav/sidebar/_profile' do
let(:user) { create(:user) }
before do
diff --git a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
index 881ea818cb0..bf0bf63e164 100644
--- a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
+++ b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-describe 'layouts/nav/sidebar/_project' do
+RSpec.describe 'layouts/nav/sidebar/_project' do
let(:project) { create(:project, :repository) }
before do
@@ -76,7 +76,7 @@ describe 'layouts/nav/sidebar/_project' do
it 'does not show the wiki tab' do
render
- expect(rendered).not_to have_link('Wiki', href: wiki_path(project.wiki))
+ expect(rendered).not_to have_link('Wiki')
end
end
end
@@ -109,6 +109,38 @@ describe 'layouts/nav/sidebar/_project' do
end
end
+ describe 'confluence tab' do
+ let!(:service) { create(:confluence_service, project: project, active: active) }
+
+ before do
+ render
+ end
+
+ context 'when the Confluence integration is active' do
+ let(:active) { true }
+
+ it 'shows the Confluence tab' do
+ expect(rendered).to have_link('Confluence', href: project_wikis_confluence_path(project))
+ end
+
+ it 'does not show the GitLab wiki tab' do
+ expect(rendered).not_to have_link('Wiki')
+ end
+ end
+
+ context 'when it is disabled' do
+ let(:active) { false }
+
+ it 'does not show the Confluence tab' do
+ expect(rendered).not_to have_link('Confluence')
+ end
+
+ it 'shows the GitLab wiki tab' do
+ expect(rendered).to have_link('Wiki', href: wiki_path(project.wiki))
+ end
+ end
+ end
+
describe 'ci/cd settings tab' do
before do
project.update!(archived: project_archived)