Skip to content
Closed
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
14 changes: 10 additions & 4 deletions config/smart_answers/check_benefits_financial_support_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,20 @@
- england
- name: winter_fuel_payment
title: Winter Fuel Payment
description: <p>You'll automatically get a Winter Fuel Payment if you get Pension Credit or certain benefits. You should get a letter in October or November telling you how much you'll get, if you’re eligible.</p>
description: <p>You'll automatically get a Winter Fuel Payment if you’ve reached State Pension age. You should get a letter in October or November telling you how much youll get, if you’re eligible.</p><p class="govuk-body"><b><a class="govuk-link" href="/winter-fuel-payment/report-change-circumstances">If you do not get a letter, check if you're eligible and whether you need to claim a Winter Fuel Payment</a></b><p>If your taxable income is over £35,000, HMRC will take back your Winter Fuel Payment through the tax system.</p><p class="govuk-body">You can <a class="govuk-link" href="/winter-fuel-payment/report-change-circumstances">opt out of getting the Winter Fuel Payment</a> if you do not want to receive it.</p>
condition: eligible_for_winter_fuel_payment?
url: /winter-fuel-payment/how-to-claim
url_text: If you do not get a letter, check if you're eligible and whether you need to claim a Winter Fuel Payment
url: nil
url_text: ""
countries:
- england
- wales
- scotland
- name: winter_fuel_payment_ni
title: Winter Fuel Payment
description: <p class="govuk-body">You might be eligible for a <a class="govuk-link" href="https://www.nidirect.gov.uk/contacts/winter-fuel-payment-centre">Winter Fuel Payment from the Northern Ireland Executive</a>.</p>
condition: eligible_for_winter_fuel_payment_ni?
url: nil
url_text: ""
countries:
- northern-ireland
- name: carers_allowance
title: Carer’s Allowance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,16 +230,14 @@ def eligible_for_child_disability_support?
end

def eligible_for_winter_fuel_payment?
return false if @where_do_you_live == "scotland"
return false unless @over_state_pension_age == "yes"
return false if @on_benefits == "no"
return true if @on_benefits == "dont_know"
return false if
@where_do_you_live == "scotland" || @where_do_you_live == "northern-ireland"

qualifying_benefits = %w[universal_credit jobseekers_allowance employment_and_support_allowance pension_credit income_support]
qualifying_benefits.each do |benefit|
return true if @current_benefits.include?(benefit)
end
false
true if @over_state_pension_age == "yes"
end

def eligible_for_winter_fuel_payment_ni?
@where_do_you_live == "northern-ireland" && @over_state_pension_age == "yes"
end

def eligible_for_carers_allowance?
Expand Down
12 changes: 10 additions & 2 deletions test/flows/check_benefits_financial_support_flow_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -637,14 +637,22 @@ class CheckBenefitsFinancialSupportFlowTest < ActiveSupport::TestCase
end

should "render Winter Fuel Payment" do
%w[england wales northern-ireland].each do |country|
%w[england wales].each do |country|
add_responses where_do_you_live: country, over_state_pension_age: "yes"

assert_rendered_outcome text: "Winter Fuel Payment"
assert_rendered_outcome text: "You'll automatically get a Winter Fuel Payment if you get Pension Credit or certain benefits."
assert_rendered_outcome text: "You'll automatically get a Winter Fuel Payment if you’ve reached State Pension age."
assert_rendered_outcome text: "If your taxable income is over £35,000, HMRC will take back your Winter Fuel Payment through the tax system."
end
end

should "render Winter Fuel Payment for Northern Ireland" do
add_responses where_do_you_live: "northern-ireland", over_state_pension_age: "yes"

assert_rendered_outcome text: "Winter Fuel Payment"
assert_rendered_outcome text: "You might be eligible for a Winter Fuel Payment from the Northern Ireland Executive."
end

should "render Carer’s Allowance when eligible" do
add_responses carer_disability_or_health_condition: "yes"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -911,35 +911,33 @@ class CheckBenefitsFinancialSupportCalculatorTest < ActiveSupport::TestCase
assert_not @calculator.eligible_for_winter_fuel_payment?
end

should "be false if does not receive any benefits" do
@calculator.where_do_you_live = "england"
should "be false if lives in Northern Ireland" do
@calculator.where_do_you_live = "northern-ireland"
@calculator.over_state_pension_age = "yes"
@calculator.on_benefits = "no"
@calculator.on_benefits = "yes"
@calculator.current_benefits = "universal_credit"

assert_not @calculator.eligible_for_winter_fuel_payment?
end

should "be false if receives non-qualifying benefits (and no qualifying benefits)" do
should "be false if ineligible for state pension" do
@calculator.where_do_you_live = "england"
@calculator.over_state_pension_age = "yes"
@calculator.over_state_pension_age = "no"
@calculator.on_benefits = "yes"
non_qualifying_benefits = %w[housing_benefit]
non_qualifying_benefits.each do |benefit|
@calculator.current_benefits = benefit

assert_not @calculator.eligible_for_winter_fuel_payment?
end
@calculator.current_benefits = "universal_credit"

assert_not @calculator.eligible_for_winter_fuel_payment?
end
end

should "be false if ineligible for state pension" do
@calculator.where_do_you_live = "england"
@calculator.over_state_pension_age = "no"
context "when Northern Ireland" do
should "be true if lives in Northern Ireland" do
@calculator.where_do_you_live = "northern-ireland"
@calculator.over_state_pension_age = "yes"
@calculator.on_benefits = "yes"
@calculator.current_benefits = "universal_credit"

assert_not @calculator.eligible_for_winter_fuel_payment?
assert @calculator.eligible_for_winter_fuel_payment_ni?
end
end
end
Expand Down