1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00
mastodon/spec/workers/admin/domain_purge_worker_spec.rb
2023-06-22 14:55:22 +02:00

18 lines
510 B
Ruby

# 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 = instance_double(PurgeDomainService, 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