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