diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /spec/services/admin | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'spec/services/admin')
-rw-r--r-- | spec/services/admin/propagate_service_template_spec.rb | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/spec/services/admin/propagate_service_template_spec.rb b/spec/services/admin/propagate_service_template_spec.rb deleted file mode 100644 index c8ca3173f99..00000000000 --- a/spec/services/admin/propagate_service_template_spec.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Admin::PropagateServiceTemplate do - describe '.propagate' do - let_it_be(:project) { create(:project) } - - let!(:service_template) do - Integrations::Pushover.create!( - template: true, - active: true, - push_events: false, - properties: { - device: 'MyDevice', - sound: 'mic', - priority: 4, - user_key: 'asdf', - api_key: '123456789' - } - ) - end - - it 'calls to PropagateIntegrationProjectWorker' do - expect(PropagateIntegrationProjectWorker).to receive(:perform_async) - .with(service_template.id, project.id, project.id) - - described_class.propagate(service_template) - end - - context 'with a project that has another service' do - before do - Integrations::Bamboo.create!( - active: true, - project: project, - properties: { - bamboo_url: 'http://gitlab.com', - username: 'mic', - password: 'password', - build_key: 'build' - } - ) - end - - it 'calls to PropagateIntegrationProjectWorker' do - expect(PropagateIntegrationProjectWorker).to receive(:perform_async) - .with(service_template.id, project.id, project.id) - - described_class.propagate(service_template) - end - end - - it 'does not create the service if it exists already' do - Integration.build_from_integration(service_template, project_id: project.id).save! - - expect { described_class.propagate(service_template) } - .not_to change { Integration.count } - end - end -end |