debian-mirror-gitlab/spec/workers/todos_destroyer/confidential_issue_worker_spec.rb
2019-09-04 21:01:54 +05:30

22 lines
744 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
describe TodosDestroyer::ConfidentialIssueWorker do
let(:service) { double }
it "calls the Todos::Destroy::ConfidentialIssueService with issue_id parameter" do
expect(::Todos::Destroy::ConfidentialIssueService).to receive(:new).with(issue_id: 100, project_id: nil).and_return(service)
expect(service).to receive(:execute)
described_class.new.perform(100)
end
it "calls the Todos::Destroy::ConfidentialIssueService with project_id parameter" do
expect(::Todos::Destroy::ConfidentialIssueService).to receive(:new).with(issue_id: nil, project_id: 100).and_return(service)
expect(service).to receive(:execute)
described_class.new.perform(nil, 100)
end
end