diff options
author | Evan Read <eread@gitlab.com> | 2021-02-03 03:08:05 +0300 |
---|---|---|
committer | Evan Read <eread@gitlab.com> | 2021-04-06 07:36:24 +0300 |
commit | 1698c76cd01c5b3757335ba9b010c9732f38eeb2 (patch) | |
tree | 839c8528fae12860c7f7e9b448e993f4b8e82c66 /spec/gitlab | |
parent | b84f28e790547c0cd86623638dc794cb5b6c4c1c (diff) |
Unify global navigation for docs site
Diffstat (limited to 'spec/gitlab')
-rw-r--r-- | spec/gitlab/navigation_spec.rb | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/spec/gitlab/navigation_spec.rb b/spec/gitlab/navigation_spec.rb index cf092e37..abcf1fee 100644 --- a/spec/gitlab/navigation_spec.rb +++ b/spec/gitlab/navigation_spec.rb @@ -9,7 +9,6 @@ describe Gitlab::Navigation do let(:item) { double(path: '/omnibus/user/README.html', identifier: double(to_s: '/omnibus/user/README.md')) } let(:items) do { - '/_data/omnibus-nav.yaml' => { sections: [Gitlab::Navigation::Section.new(section_title: 'Omnibus Section')] }, '/_data/default-nav.yaml' => { sections: [Gitlab::Navigation::Section.new(section_title: 'Default Section')] } } end @@ -17,13 +16,6 @@ describe Gitlab::Navigation do describe '#nav_items' do subject { navigation.nav_items } - it 'returns project specific sections' do - sections = subject[:sections] - section = sections.first - - expect(section.title).to eq('Omnibus Section') - end - context 'when yaml configuration for project does not exist' do let(:item) { double(path: '/ee/user/README.html', identifier: double(to_s: '/ee/user/README.md')) } @@ -40,14 +32,14 @@ describe Gitlab::Navigation do subject { navigation.element_href(element) } let(:element) { Gitlab::Navigation::Section.new(section_url: url) } - let(:url) { 'user/README.html' } + let(:url) { 'omnibus/user/README.html' } it { is_expected.to eq('/omnibus/user/README.html') } context 'when yaml configuration for project does not exist' do let(:item) { double(path: '/ee/user/README.html', identifier: double(to_s: '/ee/user/README.md')) } - it { is_expected.to eq('/ee/user/README.html') } + it { is_expected.to eq('/omnibus/user/README.html') } end end @@ -55,7 +47,7 @@ describe Gitlab::Navigation do subject { navigation.show_element?(element) } let(:element) { Gitlab::Navigation::Section.new(section_url: url) } - let(:url) { 'user/README.html' } + let(:url) { 'omnibus/user/README.html' } it { is_expected.to be_truthy } @@ -73,20 +65,4 @@ describe Gitlab::Navigation do it { is_expected.to eq 'SectionExample' } end - - describe '#optional_ee_badge' do - subject { navigation.optional_ee_badge(element) } - - let(:element) { Gitlab::Navigation::Section.new(ee_only: ee_only, ee_tier: ee_tier) } - let(:ee_tier) { 'GitLab Starter' } - let(:ee_only) { true } - - it { is_expected.to include('span').and include(ee_tier) } - - context 'when ee_only -> false' do - let(:ee_only) { false } - - it { is_expected.to be_nil } - end - end end |