Skip to content

Commit

Permalink
Merge pull request #3137 from DFE-Digital/LUPEALPHA-923/verification-…
Browse files Browse the repository at this point in the history
…deadline

[LUPEALPHA-923] Update the verification due date
  • Loading branch information
rjlynch authored Aug 30, 2024
2 parents d5bb7a9 + dc5d1d4 commit d552237
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/mailers/claim_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ def further_education_payment_provider_verification_email(claim)
recipient_name: claim.school.name,
claimant_name: claim.full_name,
claim_reference: claim.reference,
claim_submission_date: claim.created_at.to_s(:govuk_date),
verification_due_date: claim.eligibility.verification_deadline.to_s(:govuk_date),
claim_submission_date: l(claim.created_at.to_date),
verification_due_date: l(Policies::FurtherEducationPayments.verification_due_date_for_claim(claim)),
verification_url: Journeys::FurtherEducationPayments::Provider::SlugSequence.verify_claim_url(claim)
}

Expand Down
4 changes: 4 additions & 0 deletions app/models/policies/further_education_payments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@ module FurtherEducationPayments
def notify_reply_to_id
nil
end

def verification_due_date_for_claim(claim)
(claim.created_at + 2.weeks).to_date
end
end
end
5 changes: 0 additions & 5 deletions app/models/policies/further_education_payments/eligibility.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ def fixed_contract?
def verified?
verification.present?
end

# FIXME LUPEYALPHA-923
def verification_deadline
created_at + 1.week
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@
it "emails the claim provider" do
allow(ClaimVerifierJob).to receive(:perform_later)

perform_enqueued_jobs { subject }
travel_to DateTime.new(2024, 3, 1, 0, 0, 0) do
perform_enqueued_jobs { subject }
end

claim = form.claim

Expand All @@ -74,8 +76,8 @@
recipient_name: claim.school.name,
claimant_name: [answers.first_name, answers.surname].join(" "),
claim_reference: claim.reference,
claim_submission_date: claim.submitted_at.to_s(:govuk_date),
verification_due_date: claim.eligibility.verification_deadline.to_s(:govuk_date),
claim_submission_date: "1 March 2024",
verification_due_date: "15 March 2024",
verification_url: Journeys::FurtherEducationPayments::Provider::SlugSequence.verify_claim_url(claim)
)
)
Expand Down

0 comments on commit d552237

Please sign in to comment.