This repository has been archived on 2024-06-09. You can view files and clone it, but cannot push or open issues/pull-requests.
2021-12-17 23:01:21 +01:00
|
|
|
# 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
|
2023-06-22 14:55:22 +02:00
|
|
|
service = instance_double(PurgeDomainService, call: nil)
|
2021-12-17 23:01:21 +01:00
|
|
|
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
|