about summary refs log tree commit diff
path: root/spec/workers/admin/domain_purge_worker_spec.rb
blob: b67c58b234589f36d83476c9c89e5b9ce65ea5fc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

require 'rails_helper'

describe Admin::DomainPurgeWorker do
  subject { described_class.new }

  describe 'perform' do
    it 'calls domain purge service for relevant domain block' do
      service = double(call: nil)
      allow(PurgeDomainService).to receive(:new).and_return(service)
      result = subject.perform('example.com')

      expect(result).to be_nil
      expect(service).to have_received(:call).with('example.com')
    end
  end
end