domain_purge_worker_spec.rb 510 B

123456789101112131415161718
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. describe Admin::DomainPurgeWorker do
  4. subject { described_class.new }
  5. describe 'perform' do
  6. it 'calls domain purge service for relevant domain block' do
  7. service = instance_double(PurgeDomainService, call: nil)
  8. allow(PurgeDomainService).to receive(:new).and_return(service)
  9. result = subject.perform('example.com')
  10. expect(result).to be_nil
  11. expect(service).to have_received(:call).with('example.com')
  12. end
  13. end
  14. end