Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes missing reference for claim #3309

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/forms/claim_submission_base_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def save

ClaimMailer.submitted(claim).deliver_later
ClaimVerifierJob.perform_later(claim)

true
end

private
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Journeys
module FurtherEducationPayments
class ClaimSubmissionForm < ::ClaimSubmissionBaseForm
def save
super
return false unless super

if Policies::FurtherEducationPayments.duplicate_claim?(claim)
claim.eligibility.update!(flagged_as_duplicate: true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,12 @@
).and_return(double(deliver_later: nil))

first_claim_form = described_class.new(journey_session: journey_session)
second_claim_form = described_class.new(journey_session: journey_session)

first_claim_form.save

journey_session.update! claim: nil
second_claim_form = described_class.new(journey_session: journey_session)

second_claim_form.save

expect(ClaimMailer).to(
Expand Down