diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
commit | 0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch) | |
tree | 4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb | |
parent | 744144d28e3e7fddc117924fef88de5d9674fe4c (diff) |
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb')
-rw-r--r-- | spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb | 30 |
1 files changed, 28 insertions, 2 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 3afebfbedab..adfe1cee6d6 100644 --- a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb +++ b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb @@ -68,8 +68,8 @@ RSpec.describe 'layouts/nav/sidebar/_project' do end describe 'Learn GitLab' do - it 'has a link to the learn GitLab experiment' do - allow(view).to receive(:learn_gitlab_experiment_enabled?).and_return(true) + it 'has a link to the learn GitLab' do + allow(view).to receive(:learn_gitlab_enabled?).and_return(true) allow_next_instance_of(LearnGitlab::Onboarding) do |onboarding| expect(onboarding).to receive(:completed_percentage).and_return(20) end @@ -968,6 +968,32 @@ RSpec.describe 'layouts/nav/sidebar/_project' do end end end + + describe 'Usage Quotas' do + context 'with project_storage_ui feature flag enabled' do + before do + stub_feature_flags(project_storage_ui: true) + end + + it 'has a link to Usage Quotas' do + render + + expect(rendered).to have_link('Usage Quotas', href: project_usage_quotas_path(project)) + end + end + + context 'with project_storage_ui feature flag disabled' do + before do + stub_feature_flags(project_storage_ui: false) + end + + it 'does not have a link to Usage Quotas' do + render + + expect(rendered).not_to have_link('Usage Quotas', href: project_usage_quotas_path(project)) + end + end + end end describe 'Hidden menus' do |