debian-mirror-gitlab/spec/workers/propagate_integration_worker_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
621 B
Ruby
Raw Normal View History

2020-06-23 00:09:42 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe PropagateIntegrationWorker do
2020-06-23 00:09:42 +05:30
describe '#perform' do
2021-10-27 15:23:28 +05:30
let(:project) { create(:project) }
2020-06-23 00:09:42 +05:30
let(:integration) do
2021-09-04 01:27:46 +05:30
Integrations::Pushover.create!(
2021-10-27 15:23:28 +05:30
project: project,
2020-06-23 00:09:42 +05:30
active: true,
device: 'MyDevice',
sound: 'mic',
priority: 4,
user_key: 'asdf',
api_key: '123456789'
)
end
it 'calls the propagate service with the integration' do
2022-01-26 12:08:38 +05:30
expect(Integrations::PropagateService).to receive(:propagate).with(integration)
2020-11-24 15:15:51 +05:30
subject.perform(integration.id)
end
2020-06-23 00:09:42 +05:30
end
end