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

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Read <eread@gitlab.com>2022-06-27 07:04:48 +0300
committerEvan Read <eread@gitlab.com>2022-06-27 07:04:48 +0300
commit2f81fbe21f09ae7dd80ceebf7a70903b0febcfe2 (patch)
tree2e7290fbeef39b87220fedde767e8d5ff03ab40b /spec/gitlab/navigation
parent1b4bf766f209b95186e06df6c7956494ba7c0c49 (diff)
Match spec location to implementation location
Diffstat (limited to 'spec/gitlab/navigation')
-rw-r--r--spec/gitlab/navigation/category_spec.rb85
-rw-r--r--spec/gitlab/navigation/doc_spec.rb84
-rw-r--r--spec/gitlab/navigation/section_spec.rb77
3 files changed, 0 insertions, 246 deletions
diff --git a/spec/gitlab/navigation/category_spec.rb b/spec/gitlab/navigation/category_spec.rb
deleted file mode 100644
index f0424171..00000000
--- a/spec/gitlab/navigation/category_spec.rb
+++ /dev/null
@@ -1,85 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require 'gitlab/navigation/category'
-require 'gitlab/navigation/doc'
-
-describe Gitlab::Navigation::Category do
- subject(:category) { described_class.new(element) }
-
- let(:element) do
- {
- category_title: title,
- external_url: external_url,
- category_url: url,
- ee_only: ee_only,
- ee_tier: ee_tier,
- docs: docs
- }
- end
-
- let(:title) { 'Title' }
- let(:external_url) { 'http://example.com' }
- let(:url) { 'README.html' }
- let(:ee_only) { true }
- let(:ee_tier) { 'GitLab Premium' }
- let(:docs) { [{ doc_title: 'Doc Title' }] }
-
- describe '#title' do
- subject { category.title }
-
- it { is_expected.to eq(title) }
- end
-
- describe '#external_url' do
- subject { category.external_url }
-
- it { is_expected.to eq(external_url) }
- end
-
- describe '#url' do
- subject { category.url }
-
- it { is_expected.to eq(url) }
- end
-
- describe '#ee_only?' do
- subject { category.ee_only? }
-
- it { is_expected.to eq(ee_only) }
- end
-
- describe '#ee_tier' do
- subject { category.ee_tier }
-
- it { is_expected.to eq(ee_tier) }
- end
-
- describe '#has_children?' do
- subject { category.has_children? }
-
- it { is_expected.to be_truthy }
-
- context 'when docs are empty' do
- let(:docs) { [] }
-
- it { is_expected.to be_falsey }
- end
- end
-
- describe '#children' do
- subject { category.children }
-
- it 'returns a list of children' do
- children = subject
-
- expect(children.first.title).to eq('Doc Title')
- end
-
- context 'when docs are empty' do
- let(:docs) { [] }
-
- it { is_expected.to eq([]) }
- end
- end
-end
diff --git a/spec/gitlab/navigation/doc_spec.rb b/spec/gitlab/navigation/doc_spec.rb
deleted file mode 100644
index 600edb44..00000000
--- a/spec/gitlab/navigation/doc_spec.rb
+++ /dev/null
@@ -1,84 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require 'gitlab/navigation/doc'
-
-describe Gitlab::Navigation::Doc do
- subject(:doc) { described_class.new(element) }
-
- let(:element) do
- {
- doc_title: title,
- external_url: external_url,
- doc_url: url,
- ee_only: ee_only,
- ee_tier: ee_tier,
- docs: docs
- }
- end
-
- let(:title) { 'Title' }
- let(:external_url) { 'http://example.com' }
- let(:url) { 'README.html' }
- let(:ee_only) { true }
- let(:ee_tier) { 'GitLab Premium' }
- let(:docs) { [{ doc_title: 'Doc Title' }] }
-
- describe '#title' do
- subject { doc.title }
-
- it { is_expected.to eq(title) }
- end
-
- describe '#external_url' do
- subject { doc.external_url }
-
- it { is_expected.to eq(external_url) }
- end
-
- describe '#url' do
- subject { doc.url }
-
- it { is_expected.to eq(url) }
- end
-
- describe '#ee_only?' do
- subject { doc.ee_only? }
-
- it { is_expected.to eq(ee_only) }
- end
-
- describe '#ee_tier' do
- subject { doc.ee_tier }
-
- it { is_expected.to eq(ee_tier) }
- end
-
- describe '#has_children?' do
- subject { doc.has_children? }
-
- it { is_expected.to be_truthy }
-
- context 'when docs are empty' do
- let(:docs) { [] }
-
- it { is_expected.to be_falsey }
- end
- end
-
- describe '#children' do
- subject { doc.children }
-
- it 'returns a list of children' do
- children = subject
-
- expect(children.first.title).to eq('Doc Title')
- end
-
- context 'when docs are empty' do
- let(:docs) { [] }
-
- it { is_expected.to eq([]) }
- end
- end
-end
diff --git a/spec/gitlab/navigation/section_spec.rb b/spec/gitlab/navigation/section_spec.rb
deleted file mode 100644
index f71f60f2..00000000
--- a/spec/gitlab/navigation/section_spec.rb
+++ /dev/null
@@ -1,77 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require 'gitlab/navigation/section'
-require 'gitlab/navigation/category'
-
-describe Gitlab::Navigation::Section do
- subject(:section) { described_class.new(element) }
-
- let(:element) do
- {
- section_title: title,
- section_url: url,
- ee_only: ee_only,
- ee_tier: ee_tier,
- section_categories: categories
- }
- end
-
- let(:title) { 'Title' }
- let(:url) { 'README.html' }
- let(:ee_only) { true }
- let(:ee_tier) { 'GitLab Premium' }
- let(:categories) { [{ category_title: 'Category Title' }] }
-
- describe '#title' do
- subject { section.title }
-
- it { is_expected.to eq(title) }
- end
-
- describe '#url' do
- subject { section.url }
-
- it { is_expected.to eq(url) }
- end
-
- describe '#ee_only?' do
- subject { section.ee_only? }
-
- it { is_expected.to eq(ee_only) }
- end
-
- describe '#ee_tier' do
- subject { section.ee_tier }
-
- it { is_expected.to eq(ee_tier) }
- end
-
- describe '#has_children?' do
- subject { section.has_children? }
-
- it { is_expected.to be_truthy }
-
- context 'when categories are empty' do
- let(:categories) { [] }
-
- it { is_expected.to be_falsey }
- end
- end
-
- describe '#children' do
- subject { section.children }
-
- it 'returns a list of children' do
- children = subject
-
- expect(children.first.title).to eq('Category Title')
- end
-
- context 'when categories are empty' do
- let(:categories) { [] }
-
- it { is_expected.to eq([]) }
- end
- end
-end