Welcome to mirror list, hosted at ThFree Co, Russian Federation.

propagate_integration_worker_spec.rb « workers « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 902e3206d355ed3a433f3a428570c04587c1d44a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe PropagateIntegrationWorker do
  describe '#perform' do
    let(:project) { create(:project) }
    let(:integration) do
      Integrations::Pushover.create!(
        project: project,
        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)

      subject.perform(integration.id)
    end
  end
end