Skip to content

Commit

Permalink
fix eligibility error for "family_relationships" (#4289)
Browse files Browse the repository at this point in the history
* fix eligibility error for "family_relationships"

* feat: Add error message for "family_relationships" eligibility issue

* fix cucumber content text

---------

Co-authored-by: Alec Turnbull <[email protected]>
  • Loading branch information
bbodine1 and ATBull81 committed Aug 16, 2024
1 parent 34bbafa commit 494d736
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/models/insured_eligible_for_benefit_rule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def satisfied?
@errors << ["eligibility failed on market kind"]
elsif FinancialAssistanceRegistry[:consumer_validations].enabled?
@errors << [eligibility_errors(element)]
elsif element == "family_relationships"
@errors << ["Ineligible due to family relationships"]
else
@errors << ["eligibility failed on #{element}"]
end
Expand All @@ -83,6 +85,8 @@ def eligibility_errors(element)
"Since #{name} is not currently a state resident,#{pronoun} is not eligible to purchase a plan on #{short_name}.<br/> Other family members may still be eligible to enroll."
when "incarceration_status"
"Since #{name} is currently incarcerated, #{pronoun} is not eligible to purchase a plan on #{short_name}.<br/> Other family members may still be eligible to enroll."
when "family_relationships"
"Ineligible due to family relationships"
else
"eligibility failed on #{element}"
end
Expand Down
2 changes: 1 addition & 1 deletion features/step_definitions/group_selection_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@
if person&.active_employee_roles.present?
expect(page).to have_content "Employer sponsored coverage is not available"
else
expect(page).to have_content "eligibility failed on family_relationships"
expect(page).to have_content "Ineligible due to family relationships"
end
end

Expand Down

0 comments on commit 494d736

Please sign in to comment.