Skip to content

Commit

Permalink
Add rejection reasons for IRP emails
Browse files Browse the repository at this point in the history
Adds the rejection reasons given in the ticket. I've also updated the
notify email rejection template to work with these reasons.
  • Loading branch information
rjlynch committed Jul 25, 2024
1 parent 08087c5 commit 9762ba4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
9 changes: 8 additions & 1 deletion app/models/policies/international_relocation_payments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ module InternationalRelocationPayments
MIN_QA_THRESHOLD = 100

# Options shown to admins when rejecting a claim
ADMIN_DECISION_REJECTED_REASONS = []
ADMIN_DECISION_REJECTED_REASONS = [
:duplicate,
:ineligible_school,
:invalid_bank_details,
:ineligible_visa_or_entry_date,
:ineligible_employment_terms,
:no_response_from_school
]

# NOTE RL: currently IRP only has a single reply to address, so notify
# doesn't show the address id
Expand Down
8 changes: 8 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,14 @@ en:
policy_short_name: "International Relocation Payments"
policy_acronym: "IRP"
admin:
decision:
rejected_reasons:
duplicate: Duplicate application
ineligible_school: Ineligible school
invalid_bank_details: Invalid bank details
ineligible_visa_or_entry_date: "Visa/entry date ineligible"
ineligible_employment_terms: Ineligible employment terms
no_response_from_school: No response from school
eligibility_answers:
nationality: "Nationality"
passport_number: "Passport number"
Expand Down
8 changes: 1 addition & 7 deletions spec/features/admin_view_claim_spec.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
require "rails_helper"

RSpec.feature "Admin view claim" do
Policies.all.each do |policy|
# FIXME RL temp stub out this test until we've added rejection reasons for
# IRP
unless policy == Policies::InternationalRelocationPayments
it_behaves_like "Admin View Claim Feature", policy
end
end
Policies.all.each { |policy| it_behaves_like "Admin View Claim Feature", policy }
end

0 comments on commit 9762ba4

Please sign in to comment.