Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/projects/usage_quotas_spec.rb')
-rw-r--r--spec/requests/projects/usage_quotas_spec.rb50
1 files changed, 18 insertions, 32 deletions
diff --git a/spec/requests/projects/usage_quotas_spec.rb b/spec/requests/projects/usage_quotas_spec.rb
index 04e01da61ef..114e9bd9f1e 100644
--- a/spec/requests/projects/usage_quotas_spec.rb
+++ b/spec/requests/projects/usage_quotas_spec.rb
@@ -22,40 +22,26 @@ RSpec.describe 'Project Usage Quotas' do
end
describe 'GET /:namespace/:project/usage_quotas' do
- context 'with project_storage_ui feature flag enabled' do
- before do
- stub_feature_flags(project_storage_ui: true)
- end
-
- it 'renders usage quotas path' do
- mock_storage_app_data = {
- project_path: project.full_path,
- usage_quotas_help_page_path: help_page_path('user/usage_quotas'),
- build_artifacts_help_page_path: help_page_path('ci/pipelines/job_artifacts', anchor: 'when-job-artifacts-are-deleted'),
- packages_help_page_path: help_page_path('user/packages/package_registry/index.md', anchor: 'delete-a-package'),
- repository_help_page_path: help_page_path('user/project/repository/reducing_the_repo_size_using_git'),
- snippets_help_page_path: help_page_path('user/snippets', anchor: 'reduce-snippets-repository-size'),
- wiki_help_page_path: help_page_path('administration/wikis/index.md', anchor: 'reduce-wiki-repository-size')
- }
- get project_usage_quotas_path(project)
-
- expect(response).to have_gitlab_http_status(:ok)
- expect(response.body).to include(project_usage_quotas_path(project))
- expect(assigns[:storage_app_data]).to eq(mock_storage_app_data)
- expect(response.body).to include("Usage of project resources across the <strong>#{project.name}</strong> project")
- end
-
- context 'renders :not_found for user without permission' do
- let(:role) { :developer }
-
- it_behaves_like 'response with 404 status'
- end
+ it 'renders usage quotas path' do
+ mock_storage_app_data = {
+ project_path: project.full_path,
+ usage_quotas_help_page_path: help_page_path('user/usage_quotas'),
+ build_artifacts_help_page_path: help_page_path('ci/pipelines/job_artifacts', anchor: 'when-job-artifacts-are-deleted'),
+ packages_help_page_path: help_page_path('user/packages/package_registry/index.md', anchor: 'delete-a-package'),
+ repository_help_page_path: help_page_path('user/project/repository/reducing_the_repo_size_using_git'),
+ snippets_help_page_path: help_page_path('user/snippets', anchor: 'reduce-snippets-repository-size'),
+ wiki_help_page_path: help_page_path('administration/wikis/index.md', anchor: 'reduce-wiki-repository-size')
+ }
+ get project_usage_quotas_path(project)
+
+ expect(response).to have_gitlab_http_status(:ok)
+ expect(response.body).to include(project_usage_quotas_path(project))
+ expect(assigns[:storage_app_data]).to eq(mock_storage_app_data)
+ expect(response.body).to include("Usage of project resources across the <strong>#{project.name}</strong> project")
end
- context 'with project_storage_ui feature flag disabled' do
- before do
- stub_feature_flags(project_storage_ui: false)
- end
+ context 'renders :not_found for user without permission' do
+ let(:role) { :developer }
it_behaves_like 'response with 404 status'
end