Update `Ajax::AnswerController` test to expect multiple `ShareWorker` jobs

This commit is contained in:
Karina Kwiatek 2021-12-25 15:22:19 +01:00
parent b0fce22ef1
commit fa025ced92
1 changed files with 3 additions and 1 deletions

View File

@ -27,7 +27,9 @@ describe Ajax::AnswerController, :ajax_controller, type: :controller do
it "enqueues a job for sharing the answer to social networks" do
subject
expect(ShareWorker).to have_enqueued_sidekiq_job(user.id, Answer.last.id, shared_services)
shared_services.each do |service|
expect(ShareWorker).to have_enqueued_sidekiq_job(user.id, Answer.last.id, service)
end
end
include_examples "returns the expected response"