diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /spec/controllers/projects/templates_controller_spec.rb | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'spec/controllers/projects/templates_controller_spec.rb')
-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 |