diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-28 09:10:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-28 09:10:48 +0300 |
commit | d193734fb97510ffc55f84c2f3a0a3692cd2d859 (patch) | |
tree | d01546164fb50d89639e8f4c39e81776bb1347c6 /spec/controllers/projects | |
parent | 50135e6e0460e9276588670e3235a95f19a1660d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/projects')
-rw-r--r-- | spec/controllers/projects/templates_controller_spec.rb | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/spec/controllers/projects/templates_controller_spec.rb b/spec/controllers/projects/templates_controller_spec.rb index bd299efb5b5..da381357bda 100644 --- a/spec/controllers/projects/templates_controller_spec.rb +++ b/spec/controllers/projects/templates_controller_spec.rb @@ -160,28 +160,12 @@ RSpec.describe Projects::TemplatesController do end shared_examples 'template names request' do - context 'when feature flag enabled' do - it 'returns the template names', :aggregate_failures do - get(:names, params: { namespace_id: project.namespace, template_type: template_type, project_id: project }, format: :json) - - expect(response).to have_gitlab_http_status(:ok) - expect(json_response['Project Templates'].size).to eq(2) - expect(json_response['Project Templates'].map { |x| x.slice('name') }).to match(expected_template_names) - end - end - - context 'when feature flag disabled' do - before do - stub_feature_flags(inherited_issuable_templates: false) - end - - it 'returns the template names', :aggregate_failures do - get(:names, params: { namespace_id: project.namespace, template_type: template_type, project_id: project }, format: :json) + it 'returns the template names', :aggregate_failures do + get(:names, params: { namespace_id: project.namespace, template_type: template_type, project_id: project }, format: :json) - expect(response).to have_gitlab_http_status(:ok) - expect(json_response.size).to eq(2) - expect(json_response.map { |x| x.slice('name') }).to match(expected_template_names) - end + expect(response).to have_gitlab_http_status(:ok) + expect(json_response['Project Templates'].size).to eq(2) + expect(json_response['Project Templates'].map { |x| x.slice('name') }).to match(expected_template_names) end it 'fails for user with no access' do |