Skip to content

Commit

Permalink
Fixed failing tests due to improperly calling perform_async when it s…
Browse files Browse the repository at this point in the history
…hould just be perform
  • Loading branch information
micahaspyr committed Apr 15, 2024
1 parent 0b0b37e commit 81563c0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 81563c0

Please sign in to comment.