Skip to content

Commit

Permalink
Chore: Address transaction type todo
Browse files Browse the repository at this point in the history
Remove the citizen values and update tests to stop referring
to them.  They were phased out many years ago and were left
in place
  • Loading branch information
colinbruce committed Jan 10, 2025
1 parent c7aa5ef commit 3b76d6a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 31 deletions.
12 changes: 0 additions & 12 deletions config/locales/cy/transaction_types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@
cy:
transaction_types:
names:
citizens:
benefits: stifeneB
child_care: stnemyap eracdlihC
excluded_benefits: stifeneb dedragersiD
friends_or_family: ylimaf ro sdneirf morf pleh laicnaniF
legal_aid: esac lanimirc a ni dia lagel sdrawot stnemyaP
maintenance_in: rentrap remrof a morf stnemyap ecnanetniaM
maintenance_out: rentrap remrof a ot stnemyap ecnanetniaM
pension: noisneP
property_or_lodger: regdol ro ytreporp a morf emocnI
rent_or_mortgage: stnemyap gnisuoH
salary: segaw ro yralaS
providers:
benefits: stifeneB
child_care: stnemyap eracdlihC
Expand Down
15 changes: 0 additions & 15 deletions config/locales/en/transaction_types.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
en:
transaction_types:
names:
# TODO: remove this as we don't actually show transaction categories to citizens anymore, however these categories are still
# being used in a few places, and have tests and helper methods which will also need to be updated/removed
citizens:
benefits: Benefits, charitable or government payments
child_care: Childcare payments
excluded_benefits: Disregarded benefits
friends_or_family: Financial help from friends or family
housing_benefit: Housing Benefit
legal_aid: Payments towards legal aid in a criminal case
maintenance_in: Maintenance payments from a former partner
maintenance_out: Maintenance payments to a former partner
pension: Pension
property_or_lodger: Income from a property or lodger
rent_or_mortgage: Housing payments
salary: Salary or wages
providers:
benefits: Benefits, charitable or government payments
child_care: Childcare payments
Expand Down
8 changes: 4 additions & 4 deletions spec/helpers/user_transactions_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
describe "#incomings_list" do
subject(:helper_incomings_list) { helper.incomings_list(legal_aid_application.transaction_types.credits, locale_namespace:) }

context "when for a citizen" do
let(:locale_namespace) { "transaction_types.names.citizens" }
context "when for a provider" do
let(:locale_namespace) { "transaction_types.names.providers" }

it "returns correct hash" do
expect(helper_incomings_list[:items].first.to_h).to match hash_result
Expand Down Expand Up @@ -46,8 +46,8 @@

let(:transaction_type) { create(:transaction_type, :maintenance_out) }

context "when for a citizen" do
let(:locale_namespace) { "transaction_types.names.citizens" }
context "when for a provider" do
let(:locale_namespace) { "transaction_types.names.providers" }

it "returns correct hash" do
expect(helper_payments_list[:items].first.to_h).to match hash_result
Expand Down

0 comments on commit 3b76d6a

Please sign in to comment.