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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-18 06:10:18 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-18 06:10:18 +0300
commitb7a1160154d52bad5af11a8155369de827df2f74 (patch)
tree54283ee30127d2111a87d3130a13e8799b99890a /spec/helpers/nav
parent9f61aba53f7d9562b524496dd1686dc1591f0d7c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers/nav')
-rw-r--r--spec/helpers/nav/top_nav_helper_spec.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/helpers/nav/top_nav_helper_spec.rb b/spec/helpers/nav/top_nav_helper_spec.rb
index d87c751c62f..466068b7b41 100644
--- a/spec/helpers/nav/top_nav_helper_spec.rb
+++ b/spec/helpers/nav/top_nav_helper_spec.rb
@@ -539,10 +539,18 @@ RSpec.describe Nav::TopNavHelper do
end
context 'with new' do
- let(:with_new_view_model) { { id: 'test-new-view-model' } }
+ let(:with_new_view_model) { { menu_sections: [{ id: 'test-new-view-model' }] } }
it 'has new subview' do
- expect(subject[:views][:new]).to eq({ id: 'test-new-view-model' })
+ expect(subject[:views][:new]).to eq(with_new_view_model)
+ end
+ end
+
+ context 'with new and no menu_sections' do
+ let(:with_new_view_model) { { menu_sections: [] } }
+
+ it 'has new subview' do
+ expect(subject[:views][:new]).to be_nil
end
end
end