diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-12-10 12:03:00 +0000 |
---|---|---|
committer | Alessio Caiazza <acaiazza@gitlab.com> | 2018-12-18 11:01:55 +0100 |
commit | 9004e18e6e0bca3deb7115b16e345f9755c012f3 (patch) | |
tree | ca1c6ea3b96d7502097ccc6ea920b39eb3dc7784 /spec/views | |
parent | a30491158a10227dee7de96a21df8feff9343efd (diff) | |
download | gitlab-ce-9004e18e6e0bca3deb7115b16e345f9755c012f3.tar.gz |
Adds releases index route
Renders empty index page
Adds Releases entry to the navigation bar behind a feature flag
Renders 404 when feature flag for releases is not enabled
Diffstat (limited to 'spec/views')
-rw-r--r-- | spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb | 26 |
1 files changed, 26 insertions, 0 deletions
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 98d4456b277..ec20c346234 100644 --- a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb +++ b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb @@ -49,4 +49,30 @@ describe 'layouts/nav/sidebar/_project' do expect(rendered).to have_css('.sidebar-top-level-items > li.active', text: 'Registry') end end + + describe 'releases entry' do + describe 'when releases feature flag is disabled' do + before do + stub_feature_flags(releases_page: false) + end + + it 'does not render releases link' do + render + + expect(rendered).not_to have_link('Releases', href: project_releases_path(project)) + end + end + + describe 'when releases feature flags is enabled' do + before do + stub_feature_flags(releases_page: true) + end + + it 'renders releases link' do + render + + expect(rendered).to have_link('Releases', href: project_releases_path(project)) + end + end + end end |