gitlab-org--gitlab-foss/spec/workers/delete_user_worker_spec.rb
Thong Kuah d6b952ad3e
Add frozen_string_literal to spec/workers
Adds `# frozen_string_literal: true` to spec/workers ruby files
2019-04-01 13:35:22 -03:00

24 lines
684 B
Ruby

# frozen_string_literal: true
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_next_instance_of(Users::DestroyService) do |service|
expect(service).to receive(:execute).with(user, {})
end
described_class.new.perform(current_user.id, user.id)
end
it "uses symbolized keys" do
expect_next_instance_of(Users::DestroyService) do |service|
expect(service).to receive(:execute).with(user, test: "test")
end
described_class.new.perform(current_user.id, user.id, "test" => "test")
end
end