From 81563c02cbde82f3f3f3583d4e3bd9b86549ba79 Mon Sep 17 00:00:00 2001 From: Micah Frazier Date: Mon, 15 Apr 2024 16:30:51 -0600 Subject: [PATCH] Fixed failing tests due to improperly calling perform_async when it should just be perform --- .../saved_claim/education_career_counseling_claim_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/models/saved_claim/education_career_counseling_claim_spec.rb b/spec/models/saved_claim/education_career_counseling_claim_spec.rb index 79e00b82aeb..57a684aa202 100644 --- a/spec/models/saved_claim/education_career_counseling_claim_spec.rb +++ b/spec/models/saved_claim/education_career_counseling_claim_spec.rb @@ -28,23 +28,23 @@ context 'Feature ecc_benefits_intake_submission is true' do before do - allow(Lighthouse::SubmitBenefitsIntakeClaim).to receive(:perform_async) Flipper.enable(:ecc_benefits_intake_submission) end it 'calls Lighthouse::SubmitBenefitsIntakeClaim job' do - expect(Lighthouse::SubmitBenefitsIntakeClaim).to have_received(:perform_async).with(claim.id) + expect_any_instance_of(Lighthouse::SubmitBenefitsIntakeClaim).to receive(:perform).with(claim.id) + claim.send_to_benefits_intake! end end context 'Feature ecc_benefits_intake_submission is false' do before do - allow(CentralMail::SubmitSavedClaimJob).to receive(:perform_async) Flipper.disable(:ecc_benefits_intake_submission) end it 'calls CentralMail::SubmitSavedClaimJob job' do - expect(CentralMail::SubmitSavedClaimJob).to have_received(:perform_async).with(claim.id) + expect_any_instance_of(CentralMail::SubmitSavedClaimJob).to receive(:perform).with(claim.id) + claim.send_to_benefits_intake! end end end