diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-26 03:09:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-26 03:09:31 +0300 |
commit | b3618e799d30ae6df5c55e47b8ec8ebedb1af5a0 (patch) | |
tree | f2e68cff99dfa77096177caf86f7ac11e6793fd4 /spec/controllers | |
parent | 52f765baf4931efd40d10b1eb5f2818923ddf26f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers')
3 files changed, 35 insertions, 0 deletions
diff --git a/spec/controllers/admin/integrations_controller_spec.rb b/spec/controllers/admin/integrations_controller_spec.rb index 64ae2a95b4e..1793b3a86d1 100644 --- a/spec/controllers/admin/integrations_controller_spec.rb +++ b/spec/controllers/admin/integrations_controller_spec.rb @@ -9,6 +9,14 @@ RSpec.describe Admin::IntegrationsController do sign_in(admin) end + it_behaves_like IntegrationsActions do + let(:integration_attributes) { { instance: true, project: nil } } + + let(:routing_params) do + { id: integration.to_param } + end + end + describe '#edit' do Integration.available_integration_names.each do |integration_name| context "#{integration_name}" do diff --git a/spec/controllers/groups/settings/integrations_controller_spec.rb b/spec/controllers/groups/settings/integrations_controller_spec.rb index 931e726850a..31d1946652d 100644 --- a/spec/controllers/groups/settings/integrations_controller_spec.rb +++ b/spec/controllers/groups/settings/integrations_controller_spec.rb @@ -10,6 +10,21 @@ RSpec.describe Groups::Settings::IntegrationsController do sign_in(user) end + it_behaves_like IntegrationsActions do + let(:integration_attributes) { { group: group, project: nil } } + + let(:routing_params) do + { + group_id: group, + id: integration.to_param + } + end + + before do + group.add_owner(user) + end + end + describe '#index' do context 'when user is not owner' do it 'renders not_found' do diff --git a/spec/controllers/projects/services_controller_spec.rb b/spec/controllers/projects/services_controller_spec.rb index 419b5c7e101..482ba552f8f 100644 --- a/spec/controllers/projects/services_controller_spec.rb +++ b/spec/controllers/projects/services_controller_spec.rb @@ -18,6 +18,18 @@ RSpec.describe Projects::ServicesController do project.add_maintainer(user) end + it_behaves_like IntegrationsActions do + let(:integration_attributes) { { project: project } } + + let(:routing_params) do + { + namespace_id: project.namespace, + project_id: project, + id: integration.to_param + } + end + end + describe '#test' do context 'when the integration is not testable' do it 'renders 404' do |