From fa025ced92d6d1be9fc87af571cb9598477f1803 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sat, 25 Dec 2021 15:22:19 +0100 Subject: [PATCH] Update `Ajax::AnswerController` test to expect multiple `ShareWorker` jobs --- spec/controllers/ajax/answer_controller_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/controllers/ajax/answer_controller_spec.rb b/spec/controllers/ajax/answer_controller_spec.rb index b234a41b..c73e901f 100644 --- a/spec/controllers/ajax/answer_controller_spec.rb +++ b/spec/controllers/ajax/answer_controller_spec.rb @@ -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"