diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-18 06:10:18 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-18 06:10:18 +0300 |
commit | b7a1160154d52bad5af11a8155369de827df2f74 (patch) | |
tree | 54283ee30127d2111a87d3130a13e8799b99890a /spec/helpers/nav | |
parent | 9f61aba53f7d9562b524496dd1686dc1591f0d7c (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.rb | 12 |
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 |