0dacf3c169
* Changed name of delete_user_service and worker to destroy * Move and change delete_group_service to Groups::DestroyService * Rename Notes::DeleteService to Notes::DestroyService
20 lines
677 B
Ruby
20 lines
677 B
Ruby
require 'spec_helper'
|
|
|
|
describe DeleteUserWorker do
|
|
let!(:user) { create(:user) }
|
|
let!(:current_user) { create(:user) }
|
|
|
|
it "calls the DeleteUserWorker with the params it was given" do
|
|
expect_any_instance_of(Users::DestroyService).to receive(:execute).
|
|
with(user, {})
|
|
|
|
DeleteUserWorker.new.perform(current_user.id, user.id)
|
|
end
|
|
|
|
it "uses symbolized keys" do
|
|
expect_any_instance_of(Users::DestroyService).to receive(:execute).
|
|
with(user, test: "test")
|
|
|
|
DeleteUserWorker.new.perform(current_user.id, user.id, "test" => "test")
|
|
end
|
|
end
|