Add ability to purge undeliverable domains from admin interface (#16686)
* Add ability to purge undeliverable domains from admin interface * Add tests
This commit is contained in:
parent
0c17fd9109
commit
7f803c41e2
13 changed files with 121 additions and 7 deletions
18
spec/workers/admin/domain_purge_worker_spec.rb
Normal file
18
spec/workers/admin/domain_purge_worker_spec.rb
Normal file
|
@ -0,0 +1,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
|
Loading…
Add table
Add a link
Reference in a new issue