summaryrefslogtreecommitdiff
path: root/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-09-20 13:18:24 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-09-20 13:18:24 +0000
commit0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch)
tree4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
parent744144d28e3e7fddc117924fef88de5d9674fe4c (diff)
downloadgitlab-ce-0653e08efd039a5905f3fa4f6e9cef9f5d2f799c.tar.gz
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.rb30
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