summaryrefslogtreecommitdiff
path: root/spec/workers/todos_destroyer/entity_leave_worker_spec.rb
blob: 955447906aa9994d000bd014a1686b6fac6dd00b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
require 'spec_helper'

describe TodosDestroyer::EntityLeaveWorker do
  it "calls the Todos::Destroy::EntityLeaveService with the params it was given" do
    service = double

    expect(::Todos::Destroy::EntityLeaveService).to receive(:new).with(100, 5, 'Group').and_return(service)
    expect(service).to receive(:execute)

    described_class.new.perform(100, 5, 'Group')
  end
end