diff options
Diffstat (limited to 'spec/workers/propagate_integration_worker_spec.rb')
-rw-r--r-- | spec/workers/propagate_integration_worker_spec.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/workers/propagate_integration_worker_spec.rb b/spec/workers/propagate_integration_worker_spec.rb new file mode 100644 index 00000000000..e49869a38e9 --- /dev/null +++ b/spec/workers/propagate_integration_worker_spec.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe PropagateIntegrationWorker do + describe '#perform' do + let(:integration) do + PushoverService.create( + template: true, + active: true, + device: 'MyDevice', + sound: 'mic', + priority: 4, + user_key: 'asdf', + api_key: '123456789' + ) + end + + it 'calls the propagate service with the integration' do + expect(Admin::PropagateIntegrationService).to receive(:propagate) + .with(integration: integration, overwrite: true) + + subject.perform(integration.id, true) + end + end +end |