summaryrefslogtreecommitdiff
path: root/spec/views/layouts/nav
diff options
context:
space:
mode:
Diffstat (limited to 'spec/views/layouts/nav')
-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