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/api/project_templates_spec.rb')
-rw-r--r--spec/requests/api/project_templates_spec.rb45
1 files changed, 0 insertions, 45 deletions
diff --git a/spec/requests/api/project_templates_spec.rb b/spec/requests/api/project_templates_spec.rb
index 91e5ed76c37..e1d156afd54 100644
--- a/spec/requests/api/project_templates_spec.rb
+++ b/spec/requests/api/project_templates_spec.rb
@@ -63,27 +63,6 @@ RSpec.describe API::ProjectTemplates, feature_category: :source_code_management
expect(json_response).to satisfy_one { |template| template['key'] == 'mit' }
end
- it 'returns metrics_dashboard_ymls' do
- get api("/projects/#{public_project.id}/templates/metrics_dashboard_ymls")
-
- expect(response).to have_gitlab_http_status(:ok)
- expect(response).to include_pagination_headers
- expect(response).to match_response_schema('public_api/v4/template_list')
- expect(json_response).to satisfy_one { |template| template['key'] == 'Default' }
- end
-
- context 'when metrics dashboard feature is unavailable' do
- before do
- stub_feature_flags(remove_monitor_metrics: true)
- end
-
- it 'returns 400 bad request like other unknown types' do
- get api("/projects/#{public_project.id}/templates/metrics_dashboard_ymls")
-
- expect(response).to have_gitlab_http_status(:bad_request)
- end
- end
-
it 'returns issue templates' do
get api("/projects/#{private_project.id}/templates/issues", developer)
@@ -176,26 +155,6 @@ RSpec.describe API::ProjectTemplates, feature_category: :source_code_management
expect(json_response['name']).to eq('Android')
end
- it 'returns a specific metrics_dashboard_yml' do
- get api("/projects/#{public_project.id}/templates/metrics_dashboard_ymls/Default")
-
- expect(response).to have_gitlab_http_status(:ok)
- expect(response).to match_response_schema('public_api/v4/template')
- expect(json_response['name']).to eq('Default')
- end
-
- context 'when metrics dashboard feature is unavailable' do
- before do
- stub_feature_flags(remove_monitor_metrics: true)
- end
-
- it 'returns 400 bad request like other unknown types' do
- get api("/projects/#{public_project.id}/templates/metrics_dashboard_ymls/Default")
-
- expect(response).to have_gitlab_http_status(:bad_request)
- end
- end
-
it 'returns a specific license' do
get api("/projects/#{public_project.id}/templates/licenses/mit")
@@ -256,10 +215,6 @@ RSpec.describe API::ProjectTemplates, feature_category: :source_code_management
subject { get api("/projects/#{url_encoded_path}/templates/gitlab_ci_ymls/Android") }
end
- it_behaves_like 'accepts project paths with dots' do
- subject { get api("/projects/#{url_encoded_path}/templates/metrics_dashboard_ymls/Default") }
- end
-
shared_examples 'path traversal attempt' do |template_type|
it 'rejects invalid filenames' do
get api("/projects/#{public_project.id}/templates/#{template_type}/%2e%2e%2fPython%2ea")