diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /spec/requests/api/project_templates_spec.rb | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'spec/requests/api/project_templates_spec.rb')
-rw-r--r-- | spec/requests/api/project_templates_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/requests/api/project_templates_spec.rb b/spec/requests/api/project_templates_spec.rb index d242d49fc1b..fc1035fc17d 100644 --- a/spec/requests/api/project_templates_spec.rb +++ b/spec/requests/api/project_templates_spec.rb @@ -53,6 +53,15 @@ RSpec.describe API::ProjectTemplates do expect(json_response).to satisfy_one { |template| template['key'] == 'Android' } end + it 'returns gitlab_ci_syntax_ymls' do + get api("/projects/#{public_project.id}/templates/gitlab_ci_syntax_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'] == 'Artifacts example' } + end + it 'returns licenses' do get api("/projects/#{public_project.id}/templates/licenses") @@ -163,6 +172,14 @@ RSpec.describe API::ProjectTemplates do expect(json_response['name']).to eq('Android') end + it 'returns a specific gitlab_ci_syntax_yml' do + get api("/projects/#{public_project.id}/templates/gitlab_ci_syntax_ymls/Artifacts%20example") + + expect(response).to have_gitlab_http_status(:ok) + expect(response).to match_response_schema('public_api/v4/template') + expect(json_response['name']).to eq('Artifacts example') + end + it 'returns a specific metrics_dashboard_yml' do get api("/projects/#{public_project.id}/templates/metrics_dashboard_ymls/Default") |