Skip to content

Commit

Permalink
Merge pull request #3309 from DFE-Digital/fix-missing-reference-for-c…
Browse files Browse the repository at this point in the history
…laims

Fixes missing reference for claim
  • Loading branch information
rjlynch authored Oct 14, 2024
2 parents 0f1bd2e + 03c8941 commit 252d737
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
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

0 comments on commit 252d737

Please sign in to comment.