<%= form_group_tag(@amendment, :address_line_1) do %>
diff --git a/app/views/admin/tasks/payroll_details.html.erb b/app/views/admin/tasks/payroll_details.html.erb
index 09c0a1db0d..9a4ce9345e 100644
--- a/app/views/admin/tasks/payroll_details.html.erb
+++ b/app/views/admin/tasks/payroll_details.html.erb
@@ -54,7 +54,6 @@
<%= I18n.t(
"admin.tasks.payroll_details.question",
- bank_or_building_society: I18n.t("admin.#{@claim.bank_or_building_society}"),
claimant_name: @claim.full_name
) %>
diff --git a/app/views/claims/_account_details.html.erb b/app/views/claims/_account_details.html.erb
index fcd3827c4b..ea0a4ad6a7 100644
--- a/app/views/claims/_account_details.html.erb
+++ b/app/views/claims/_account_details.html.erb
@@ -1,6 +1,3 @@
-<% account_hint = bank_or_building_society == "personal bank account" ? "bank" : bank_or_building_society %>
-<% account_card = account_hint == "bank" ? account_hint : "" %>
-
<%= form_for @form, url: claim_path(current_journey_routing_name), builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %>
<%= f.govuk_error_summary %>
@@ -12,7 +9,7 @@
<%= f.govuk_text_field :banking_name,
spellcheck: "false",
label: { text: "Name on your account" },
- hint: { text: t("questions.account_hint", bank_or_building_society: account_hint, card: account_card) } %>
+ hint: { text: t("questions.account_hint") } %>
<%= f.govuk_text_field :bank_sort_code,
width: "one-quarter",
@@ -25,15 +22,6 @@
autocomplete: "off",
label: { text: "Account number" },
hint: { text: "For example: 00733445" } %>
-
- <% if bank_or_building_society == "building society" %>
- <%= f.govuk_text_field :building_society_roll_number,
- width: 20,
- autocomplete: "off",
- spellcheck: "false",
- label: { text: "Building society roll number" },
- hint: { text: "You can find it on your card, statement or passbook" } %>
- <% end %>
<% end %>
<%= govuk_warning_text(text: t("questions.check_your_account_details")) %>
diff --git a/app/views/claims/bank_or_building_society.html.erb b/app/views/claims/bank_or_building_society.html.erb
deleted file mode 100644
index 2b1f25a453..0000000000
--- a/app/views/claims/bank_or_building_society.html.erb
+++ /dev/null
@@ -1,21 +0,0 @@
-<% content_for(:page_title, page_title(t("questions.bank_or_building_society"), journey: current_journey_routing_name, show_error: @form.errors.any?)) %>
-
-
-
- <%= form_with model: @form, url: claim_path(current_journey_routing_name), builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %>
- <%= f.govuk_error_summary %>
-
- <%= f.govuk_collection_radio_buttons :bank_or_building_society, @form.radio_options, :id, :name,
- legend: {
- text: t("questions.bank_or_building_society"),
- tag: "h1",
- size: "l"
- },
- hint: {
- text: "Some places are both a bank and a building society. If your account requires a roll number your account with them is through the building society."
- } %>
-
- <%= f.govuk_submit "Continue" %>
- <% end %>
-
-
diff --git a/app/views/claims/building_society_account.html.erb b/app/views/claims/building_society_account.html.erb
index b12a31d55e..6e85311bff 100644
--- a/app/views/claims/building_society_account.html.erb
+++ b/app/views/claims/building_society_account.html.erb
@@ -1,8 +1,7 @@
-<% bank_or_building_society = @form.answers.bank_or_building_society.humanize.downcase %>
-<% content_for(:page_title, page_title(t("questions.account_details", bank_or_building_society: bank_or_building_society), journey: current_journey_routing_name, show_error: @form.errors.any?)) %>
+<%= content_for(:page_title, page_title(t("questions.account_details", bank_or_building_society: "personal bank account"), journey: current_journey_routing_name, show_error: @form.errors.any?)) %>
- <%= render partial: "account_details", locals: { bank_or_building_society: bank_or_building_society, current_journey_routing_name: current_journey_routing_name} %>
+ <%= render partial: "account_details", locals: { bank_or_building_society: "personal bank account", current_journey_routing_name: current_journey_routing_name} %>
diff --git a/app/views/claims/personal_bank_account.html.erb b/app/views/claims/personal_bank_account.html.erb
index b12a31d55e..fed7a86cbe 100644
--- a/app/views/claims/personal_bank_account.html.erb
+++ b/app/views/claims/personal_bank_account.html.erb
@@ -1,4 +1,4 @@
-<% bank_or_building_society = @form.answers.bank_or_building_society.humanize.downcase %>
+<% bank_or_building_society = "personal bank account" %>
<% content_for(:page_title, page_title(t("questions.account_details", bank_or_building_society: bank_or_building_society), journey: current_journey_routing_name, show_error: @form.errors.any?)) %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index fa052ffbf9..45aa5c9110 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -78,9 +78,8 @@ en:
personal_details: "Personal details"
national_insurance_number: "What is your National Insurance number?"
bank_details: "Enter bank account details"
- bank_or_building_society: What account do you want the money paid into?
- account_details: Enter your %{bank_or_building_society} details
- account_hint: "For example: your name as it appears on your %{bank_or_building_society} statement or %{card} card."
+ account_details: Enter your personal bank account details
+ account_hint: "For example: your name as it appears on your bank statement or bank card."
check_your_account_details: Incorrect details will cause a delay to your payment.
check_and_confirm_qualification_details: Check and confirm your qualification details
qualification_details: Qualification details
@@ -108,7 +107,6 @@ en:
teacher_reference_number: "Teacher reference number"
national_insurance_number: "National Insurance number"
email_address: "Email address"
- building_society: "building society"
personal_bank_account: "bank account"
started_at: "Started at"
submitted_at: "Submitted at"
@@ -157,8 +155,8 @@ en:
student_loan_plan:
title: "Check student loan plan"
payroll_details:
- title: "Check bank/building society account details"
- question: "The claimant’s %{bank_or_building_society} details have not been automatically validated. Has the claimant confirmed their %{bank_or_building_society} details?"
+ title: "Check bank account details"
+ question: "The claimant’s personal bank account details have not been automatically validated. Has the claimant confirmed their personal bank account details?"
census_subjects_taught:
title: "Check eligible subjects are taught"
visa:
@@ -234,17 +232,9 @@ en:
enter_roll_number: Enter a roll number
format_account_number: Account number must be 8 digits
format_sort_code: Sort code must be 6 digits
- format_roll_number:
- Building society roll number must only include letters a to z, numbers, hyphens, spaces, forward slashes and
- full stops
invalid_sort_code: Enter a valid sort code
invalid_account_number: Enter the account number associated with the name on the account and/or sort code
invalid_banking_name: Enter a valid name on the account
- length_roll_number: Building society roll number must be between 1 and 18 characters
- bank_or_building_society:
- errors:
- select_bank_or_building_society:
- Select if you want the money paid in to a personal bank account or building society
address:
questions:
your_address: What is your address?
@@ -892,7 +882,7 @@ en:
matching_details:
title: Is this claim still valid despite having matching details with other claims?
payroll_details:
- title: "Check bank/building society account details"
+ title: "Check bank account details"
provider_verification:
title: "Has the provider confirmed the claimant's details?"
contract_type:
diff --git a/spec/features/admin/admin_amend_claim_spec.rb b/spec/features/admin/admin_amend_claim_spec.rb
index 2a95b9462b..50b50c2963 100644
--- a/spec/features/admin/admin_amend_claim_spec.rb
+++ b/spec/features/admin/admin_amend_claim_spec.rb
@@ -46,7 +46,6 @@
select "Plan 2", from: "Student loan repayment plan"
fill_in "Bank sort code", with: "111213"
fill_in "Bank account number", with: "18929492"
- fill_in "Building society roll number", with: "JF 838281"
fill_in "Address line 1", with: "New address line 1"
fill_in "Address line 2", with: "New address line 2"
@@ -66,7 +65,6 @@
"student_loan_plan" => ["plan_1", "plan_2"],
"bank_sort_code" => ["010203", "111213"],
"bank_account_number" => ["47274828", "18929492"],
- "building_society_roll_number" => ["RN 123456", "JF 838281"],
"address_line_1" => ["Old address line 1", "New address line 1"],
"address_line_2" => ["Old address line 2", "New address line 2"],
"address_line_3" => ["Old address line 3", "New address line 3"],
@@ -81,7 +79,6 @@
expect(claim.student_loan_plan).to eq("plan_2")
expect(claim.bank_sort_code).to eq("111213")
expect(claim.bank_account_number).to eq("18929492")
- expect(claim.building_society_roll_number).to eq("JF 838281")
expect(claim.address_line_1).to eq("New address line 1")
expect(claim.address_line_2).to eq("New address line 2")
expect(claim.address_line_3).to eq("New address line 3")
@@ -99,7 +96,6 @@
expect(page).to have_content("Student loan repayment plan\nchanged from Plan 1 to Plan 2")
expect(page).to have_content("Bank sort code\nchanged from 010203 to 111213")
expect(page).to have_content("Bank account number\nchanged from 47274828 to 18929492")
- expect(page).to have_content("Building society roll number\nchanged from RN 123456 to JF 838281")
expect(page).to have_content("Address line 1\nchanged from Old address line 1 to New address line 1")
expect(page).to have_content("Address line 2\nchanged from Old address line 2 to New address line 2")
diff --git a/spec/features/changing_answers_spec.rb b/spec/features/changing_answers_spec.rb
index ce9a7444c8..70f3b133d5 100644
--- a/spec/features/changing_answers_spec.rb
+++ b/spec/features/changing_answers_spec.rb
@@ -287,43 +287,6 @@
expect(current_path).to eq(claim_path(Journeys::TeacherStudentLoanReimbursement::ROUTING_NAME, "check-your-answers"))
expect(journey_session.reload.answers.first_name).to eq("Bobby")
end
-
- scenario "user can change the answer to payment details" do
- jump_to_claim_journey_page(
- slug: "check-your-answers",
- journey_session: journey_session
- )
-
- expect(page).to have_content(I18n.t("questions.bank_or_building_society"))
- expect(page).to have_content("Personal bank account")
-
- find("a[href='#{claim_path(Journeys::TeacherStudentLoanReimbursement::ROUTING_NAME, "bank-or-building-society")}']").click
-
- choose "Building society"
- click_on "Continue"
-
- journey_session.reload
- expect(page).to have_content(I18n.t("questions.account_details", bank_or_building_society: journey_session.answers.bank_or_building_society.humanize.downcase))
- expect(page).to have_content("Building society roll number")
-
- expect(journey_session.answers.bank_or_building_society).to eq :building_society.to_s
- expect(journey_session.answers.banking_name).to be_nil
- expect(journey_session.answers.bank_sort_code).to be_nil
- expect(journey_session.answers.bank_account_number).to be_nil
-
- fill_in "Name on your account", with: "Miss Jasmine Aniski"
- fill_in "Sort code", with: "80-78-01"
- fill_in "Account number", with: "43290701"
- fill_in "Building society roll number", with: "6284/000390713"
-
- click_on "Continue"
-
- journey_session.reload
- expect(journey_session.answers.banking_name).to eq "Miss Jasmine Aniski"
- expect(journey_session.answers.bank_sort_code).to eq "807801"
- expect(journey_session.answers.bank_account_number).to eq "43290701"
- expect(journey_session.answers.building_society_roll_number).to eq "6284/000390713"
- end
end
describe "Teacher changes a field that requires OTP validation" do
diff --git a/spec/features/claim_with_mobile_sms_otp_spec.rb b/spec/features/claim_with_mobile_sms_otp_spec.rb
index 468a6087b2..1d3d5a0be9 100644
--- a/spec/features/claim_with_mobile_sms_otp_spec.rb
+++ b/spec/features/claim_with_mobile_sms_otp_spec.rb
@@ -54,7 +54,7 @@
fill_in "claim-one-time-password-field", with: scenario[:otp_code]
click_on "Confirm"
- expect(page).to have_text(I18n.t("questions.bank_or_building_society"))
+ expect(page).to have_text("Enter your personal bank account details")
end
end
end
diff --git a/spec/features/combined_teacher_claim_journey_spec.rb b/spec/features/combined_teacher_claim_journey_spec.rb
index 2b928172ef..42e6229cf1 100644
--- a/spec/features/combined_teacher_claim_journey_spec.rb
+++ b/spec/features/combined_teacher_claim_journey_spec.rb
@@ -191,15 +191,8 @@
# - Mobile number one-time password
expect(page).not_to have_text("Enter the 6-digit passcode")
- # Payment to Bank or Building Society
- expect(page).to have_text(I18n.t("questions.bank_or_building_society"))
-
- choose "Personal bank account"
- click_on "Continue"
-
# - Enter bank account details
- expect(page).to have_text(I18n.t("questions.account_details", bank_or_building_society: journey_session.reload.answers.bank_or_building_society.humanize.downcase))
- expect(page).not_to have_text("Building society roll number")
+ expect(page).to have_text(I18n.t("questions.account_details", bank_or_building_society: "personal bank account"))
fill_in "Name on your account", with: "Jo Bloggs"
fill_in "Sort code", with: "123456"
diff --git a/spec/features/combined_teacher_claim_journey_with_teacher_id_check_mobile_spec.rb b/spec/features/combined_teacher_claim_journey_with_teacher_id_check_mobile_spec.rb
index bcb56ef938..7614e4ddb2 100644
--- a/spec/features/combined_teacher_claim_journey_with_teacher_id_check_mobile_spec.rb
+++ b/spec/features/combined_teacher_claim_journey_with_teacher_id_check_mobile_spec.rb
@@ -171,13 +171,9 @@ def fill_in_remaining_details
# - student-loan-amount page
click_on "Continue"
- choose "Building society"
- click_on "Continue"
-
fill_in "Name on your account", with: "Jo Bloggs"
fill_in "Sort code", with: "123456"
fill_in "Account number", with: "87654321"
- fill_in "Building society roll number", with: "1234/123456789"
click_on "Continue"
# - What gender does your school's payroll system associate with you
diff --git a/spec/features/combined_teacher_claim_journey_with_teacher_id_spec.rb b/spec/features/combined_teacher_claim_journey_with_teacher_id_spec.rb
index 04f95b2a34..34ee065a45 100644
--- a/spec/features/combined_teacher_claim_journey_with_teacher_id_spec.rb
+++ b/spec/features/combined_teacher_claim_journey_with_teacher_id_spec.rb
@@ -155,10 +155,6 @@
choose "01234567890"
click_on "Continue"
- expect(page).to have_text(I18n.t("questions.bank_or_building_society"))
- choose "Personal bank account"
- click_on "Continue"
-
fill_in "Name on your account", with: "John Doe"
fill_in "Sort code", with: "123456"
fill_in "Account number", with: "87654321"
diff --git a/spec/features/early_career_payments/early_career_payments_claim_spec.rb b/spec/features/early_career_payments/early_career_payments_claim_spec.rb
index 7a55f6626c..75029a554b 100644
--- a/spec/features/early_career_payments/early_career_payments_claim_spec.rb
+++ b/spec/features/early_career_payments/early_career_payments_claim_spec.rb
@@ -183,15 +183,8 @@
# - Mobile number one-time password
expect(page).not_to have_text("Enter the 6-digit passcode")
- # Payment to Bank or Building Society
- expect(page).to have_text(I18n.t("questions.bank_or_building_society"))
-
- choose "Personal bank account"
- click_on "Continue"
-
# - Enter bank account details
expect(page).to have_text(I18n.t("questions.account_details", bank_or_building_society: "personal bank account"))
- expect(page).not_to have_text("Building society roll number")
fill_in "Name on your account", with: "Jo Bloggs"
fill_in "Sort code", with: "123456"
@@ -243,7 +236,6 @@
expect(claim.postcode).to eq("DE22 4BS")
expect(claim.email_address).to eq("david.tau1988@hotmail.co.uk")
expect(claim.provide_mobile_number).to eq false
- expect(claim.bank_or_building_society).to eq "personal_bank_account"
expect(claim.banking_name).to eq("Jo Bloggs")
expect(claim.bank_sort_code).to eq("123456")
expect(claim.bank_account_number).to eq("87654321")
@@ -594,15 +586,8 @@
# - Mobile number one-time password
expect(page).not_to have_text("Enter the 6-digit passcode")
- # Payment to Bank or Building Society
- expect(page).to have_text(I18n.t("questions.bank_or_building_society"))
-
- choose "Personal bank account"
- click_on "Continue"
-
# - Enter bank account details
expect(page).to have_text(I18n.t("questions.account_details", bank_or_building_society: "personal bank account"))
- expect(page).not_to have_text("Building society roll number")
fill_in "Name on your account", with: "Jo Bloggs"
fill_in "Sort code", with: "123456"
@@ -654,7 +639,6 @@
expect(claim.address_line_4).to eql("Nottinghamshire")
expect(claim.postcode).to eql("M1 7HL")
expect(claim.provide_mobile_number).to eql false
- expect(claim.bank_or_building_society).to eq "personal_bank_account"
expect(claim.banking_name).to eq("Jo Bloggs")
expect(claim.bank_sort_code).to eq("123456")
expect(claim.bank_account_number).to eq("87654321")
@@ -915,15 +899,8 @@
# - Mobile number one-time password
expect(page).not_to have_text("Enter the 6-digit passcode")
- # Payment to Bank or Building Society
- expect(page).to have_text(I18n.t("questions.bank_or_building_society"))
-
- choose "Personal bank account"
- click_on "Continue"
-
# - Enter bank account details
expect(page).to have_text(I18n.t("questions.account_details", bank_or_building_society: "personal bank account"))
- expect(page).not_to have_text("Building society roll number")
fill_in "Name on your account", with: "Jo Bloggs"
fill_in "Sort code", with: "123456"
@@ -964,7 +941,6 @@
expect(submitted_claim.postcode).to eql "SO16 9FX"
expect(submitted_claim.email_address).to eql("david.tau1988@hotmail.co.uk")
expect(submitted_claim.provide_mobile_number).to eql false
- expect(submitted_claim.bank_or_building_society).to eq "personal_bank_account"
expect(submitted_claim.banking_name).to eq("Jo Bloggs")
expect(submitted_claim.bank_sort_code).to eq("123456")
expect(submitted_claim.bank_account_number).to eq("87654321")
diff --git a/spec/features/further_education_payments/happy_js_path_spec.rb b/spec/features/further_education_payments/happy_js_path_spec.rb
index fa6092c687..c9692fcb53 100644
--- a/spec/features/further_education_payments/happy_js_path_spec.rb
+++ b/spec/features/further_education_payments/happy_js_path_spec.rb
@@ -117,10 +117,6 @@
choose "No"
click_on "Continue"
- expect(page).to have_content("What account do you want the money paid into?")
- choose "Personal bank account"
- click_on "Continue"
-
expect(page).to have_content("Enter your personal bank account details")
fill_in "Name on your account", with: "Jo Bloggs"
fill_in "Sort code", with: "123456"
diff --git a/spec/features/further_education_payments/happy_path_spec.rb b/spec/features/further_education_payments/happy_path_spec.rb
index 32392e7c2c..bf6549415e 100644
--- a/spec/features/further_education_payments/happy_path_spec.rb
+++ b/spec/features/further_education_payments/happy_path_spec.rb
@@ -154,10 +154,6 @@
choose "No"
click_on "Continue"
- expect(page).to have_content("What account do you want the money paid into?")
- choose "Personal bank account"
- click_on "Continue"
-
expect(page).to have_content("Enter your personal bank account details")
fill_in "Name on your account", with: "Jo Bloggs"
fill_in "Sort code", with: "123456"
diff --git a/spec/features/get_a_teacher_relocation_payment/teacher_route_completing_the_form_spec.rb b/spec/features/get_a_teacher_relocation_payment/teacher_route_completing_the_form_spec.rb
index 5c23f9aaf5..14e92c8c9d 100644
--- a/spec/features/get_a_teacher_relocation_payment/teacher_route_completing_the_form_spec.rb
+++ b/spec/features/get_a_teacher_relocation_payment/teacher_route_completing_the_form_spec.rb
@@ -91,26 +91,6 @@
then_the_application_is_submitted_successfully
end
end
-
- context "with a building society account" do
- it "submits an application" do
- and_i_complete_the_nationality_step_with(option: "Australian")
- and_i_complete_the_passport_number_step_with(options: "123456789")
- and_i_complete_the_personal_details_step
- and_i_complete_the_manual_address_step
- and_i_complete_the_email_address_step
- and_i_provide_my_mobile_number
- and_i_provide_my_building_society_details
- and_i_complete_the_payroll_gender_step
- then_the_check_your_answers_part_page_shows_my_answers(
- school,
- mobile_number: true,
- building_society: true
- )
- and_i_submit_the_application
- then_the_application_is_submitted_successfully
- end
- end
end
def then_the_check_your_answers_part_one_page_shows_my_answers
@@ -189,22 +169,9 @@ def then_the_check_your_answers_part_page_shows_my_answers(school, mobile_number
end
expect(page).to have_text("Name on bank account Walter Skinner")
-
expect(page).to have_text("Bank sort code 123456")
-
expect(page).to have_text("Bank account number 12345678")
- if building_society
- expect(page).to have_text(
- "What account do you want the money paid into? Building society"
- )
- expect(page).to have_text("Building society roll number 12345678")
- else
- expect(page).to have_text(
- "What account do you want the money paid into? Personal bank account"
- )
- end
-
expect(page).to have_text(
"How is your gender recorded on your school’s payroll system? Male"
)
diff --git a/spec/features/hmrc_bank_validation_spec.rb b/spec/features/hmrc_bank_validation_spec.rb
index fea6f644a8..d391ec3e0f 100644
--- a/spec/features/hmrc_bank_validation_spec.rb
+++ b/spec/features/hmrc_bank_validation_spec.rb
@@ -102,10 +102,6 @@ def get_to_bank_details_page
# - Provide mobile number
choose "No"
click_on "Continue"
-
- # Payment to Bank or Building Society
- choose "Personal bank account"
- click_on "Continue"
end
context "HMRC API returns a 200 response", :with_stubbed_hmrc_client do
diff --git a/spec/features/levelling_up_premium_payments_spec.rb b/spec/features/levelling_up_premium_payments_spec.rb
index f361878560..6f27461830 100644
--- a/spec/features/levelling_up_premium_payments_spec.rb
+++ b/spec/features/levelling_up_premium_payments_spec.rb
@@ -195,14 +195,8 @@ def claim_up_to_check_your_answers
# - Mobile number one-time password
expect(page).not_to have_text("Enter the 6-digit passcode")
- # - Payment to Bank or Building Society
- expect(page).to have_text(I18n.t("questions.bank_or_building_society"))
-
- choose "Personal bank account"
- click_on "Continue"
-
# - Enter bank account details
- expect(page).to have_text(I18n.t("questions.account_details", bank_or_building_society: journey_session.reload.answers.bank_or_building_society.humanize.downcase))
+ expect(page).to have_text(I18n.t("questions.account_details", bank_or_building_society: "personal bank account"))
expect(page).not_to have_text("Building society roll number")
fill_in "Name on your account", with: "Jo Bloggs"
@@ -250,7 +244,6 @@ def submit_application
expect(submitted_claim.postcode).to eql("DE22 4BS")
expect(submitted_claim.email_address).to eql("david.tau1988@hotmail.co.uk")
expect(submitted_claim.provide_mobile_number).to eql false
- expect(submitted_claim.bank_or_building_society).to eq "personal_bank_account"
expect(submitted_claim.banking_name).to eq("Jo Bloggs")
expect(submitted_claim.bank_sort_code).to eq("123456")
expect(submitted_claim.bank_account_number).to eq("87654321")
diff --git a/spec/features/student_loans_claim_spec.rb b/spec/features/student_loans_claim_spec.rb
index ed306fef27..587b483106 100644
--- a/spec/features/student_loans_claim_spec.rb
+++ b/spec/features/student_loans_claim_spec.rb
@@ -133,7 +133,6 @@ def fill_in_remaining_personal_details_and_submit
# - Provide mobile number
expect(page).to have_text(I18n.t("questions.provide_mobile_number"))
-
choose "No"
click_on "Continue"
@@ -142,20 +141,11 @@ def fill_in_remaining_personal_details_and_submit
# - Mobile number
expect(page).not_to have_text(I18n.t("questions.mobile_number"))
- expect(page).to have_text(I18n.t("questions.bank_or_building_society"))
-
- choose "Building society"
- click_on "Continue"
-
- expect(session.reload.answers.bank_or_building_society).to eq "building_society"
-
- expect(page).to have_text(I18n.t("questions.account_details", bank_or_building_society: session.answers.bank_or_building_society.humanize.downcase))
- expect(page).to have_text("Building society roll number")
+ expect(page).to have_text("Enter your personal bank account details")
fill_in "Name on your account", with: "Jo Bloggs"
fill_in "Sort code", with: "123456"
fill_in "Account number", with: "87654321"
- fill_in "Building society roll number", with: "1234/123456789"
click_on "Continue"
session.reload
@@ -163,7 +153,6 @@ def fill_in_remaining_personal_details_and_submit
expect(answers.banking_name).to eq("Jo Bloggs")
expect(answers.bank_sort_code).to eq("123456")
expect(answers.bank_account_number).to eq("87654321")
- expect(answers.building_society_roll_number).to eq("1234/123456789")
expect(page).to have_text(I18n.t("forms.gender.questions.payroll_gender"))
choose "Male"
diff --git a/spec/features/tslr/tslr_claim_journey_with_teacher_id_check_mobile_spec.rb b/spec/features/tslr/tslr_claim_journey_with_teacher_id_check_mobile_spec.rb
index 74361bb33b..b5f37abc8a 100644
--- a/spec/features/tslr/tslr_claim_journey_with_teacher_id_check_mobile_spec.rb
+++ b/spec/features/tslr/tslr_claim_journey_with_teacher_id_check_mobile_spec.rb
@@ -156,13 +156,9 @@ def fill_in_remaining_details
# - student-loan-amount page
click_on "Continue"
- choose "Building society"
- click_on "Continue"
-
fill_in "Name on your account", with: "Jo Bloggs"
fill_in "Sort code", with: "123456"
fill_in "Account number", with: "87654321"
- fill_in "Building society roll number", with: "1234/123456789"
click_on "Continue"
# - What gender does your school's payroll system associate with you
diff --git a/spec/features/tslr/tslr_claim_journey_with_teacher_id_trn_spec.rb b/spec/features/tslr/tslr_claim_journey_with_teacher_id_trn_spec.rb
index dc237be2c0..9b1775027f 100644
--- a/spec/features/tslr/tslr_claim_journey_with_teacher_id_trn_spec.rb
+++ b/spec/features/tslr/tslr_claim_journey_with_teacher_id_trn_spec.rb
@@ -110,14 +110,9 @@ def navigate_to_teacher_reference_number_page(school:)
find("#claim_mobile_check_use").click
click_on "Continue"
- # - Choose bank or building society
- choose "Building society"
- click_on "Continue"
-
fill_in "Name on your account", with: "Jo Bloggs"
fill_in "Sort code", with: "123456"
fill_in "Account number", with: "87654321"
- fill_in "Building society roll number", with: "1234/123456789"
click_on "Continue"
choose "Male"
diff --git a/spec/forms/bank_details_form_spec.rb b/spec/forms/bank_details_form_spec.rb
index d66f48280f..9dde933ade 100644
--- a/spec/forms/bank_details_form_spec.rb
+++ b/spec/forms/bank_details_form_spec.rb
@@ -22,7 +22,6 @@
banking_name:,
bank_sort_code:,
bank_account_number:,
- building_society_roll_number:,
hmrc_validation_attempt_count:
}
end
@@ -38,7 +37,6 @@
let(:banking_name) { "Jo Bloggs" }
let(:bank_sort_code) { rand(100000..999999) }
let(:bank_account_number) { rand(10000000..99999999) }
- let(:building_society_roll_number) { nil }
let(:hmrc_validation_attempt_count) { 0 }
describe "#valid?" do
@@ -91,33 +89,6 @@
it { is_expected.not_to be_valid }
end
- context "when building society" do
- let(:journey_session) do
- create(
- :"#{journey::I18N_NAMESPACE}_session",
- answers: attributes_for(
- :"#{journey::I18N_NAMESPACE}_answers",
- bank_or_building_society: "building_society"
- )
- )
- end
-
- context "with valid building society roll number" do
- let(:building_society_roll_number) { "CXJ-K6 897/98X" }
- it { is_expected.to be_valid }
- end
-
- context "with invalid building society roll number" do
- let(:building_society_roll_number) { "123456789/ABC.CD-EFGH " }
- it { is_expected.not_to be_valid }
- end
-
- context "with blank building society roll number" do
- let(:building_society_roll_number) { "" }
- it { is_expected.not_to be_valid }
- end
- end
-
context "when HMRC bank validation is enabled", :with_hmrc_bank_validation_enabled do
it "contacts the HMRC API" do
form.valid?
diff --git a/spec/forms/bank_or_building_society_form_spec.rb b/spec/forms/bank_or_building_society_form_spec.rb
deleted file mode 100644
index 3be6dfc0d8..0000000000
--- a/spec/forms/bank_or_building_society_form_spec.rb
+++ /dev/null
@@ -1,90 +0,0 @@
-require "rails_helper"
-
-RSpec.describe BankOrBuildingSocietyForm, type: :model do
- shared_examples "bank_or_building_society_form" do |journey|
- before {
- create(:journey_configuration, :student_loans)
- create(:journey_configuration, :additional_payments)
- }
-
- let(:journey_session) do
- create(
- :"#{journey::I18N_NAMESPACE}_session",
- answers: attributes_for(
- :"#{journey::I18N_NAMESPACE}_answers",
- :with_bank_details,
- building_society_roll_number: "A123456"
- )
- )
- end
-
- let(:slug) { "bank-or-building-society-form" }
- let(:claim_params) { {} }
-
- subject(:form) do
- described_class.new(
- journey_session: journey_session,
- journey: journey,
- params: ActionController::Parameters.new({slug:, claim: claim_params})
- )
- end
-
- describe "validations" do
- it { should allow_value(%w[personal_bank_account building_society]).for(:bank_or_building_society).with_message("Select if you want the money paid in to a personal bank account or building society") }
- end
-
- describe "#save" do
- context "when submitted with valid params" do
- let(:claim_params) { {bank_or_building_society: "personal_bank_account"} }
-
- it "saves bank_or_building_society" do
- expect(form.save).to be true
-
- expect(
- journey_session.reload.answers.bank_or_building_society
- ).to eq "personal_bank_account"
- end
- end
-
- context "when bank_or_building_society has not changed" do
- let(:claim_params) { {bank_or_building_society: "personal_bank_account"} }
-
- it "doesn't reset dependent answers" do
- expect { expect(form.save).to be true }.to(
- not_change { journey_session.reload.answers.banking_name }.and(
- not_change { journey_session.reload.answers.bank_account_number }
- ).and(
- not_change { journey_session.reload.answers.bank_sort_code }
- ).and(
- not_change { journey_session.reload.answers.building_society_roll_number }
- )
- )
- end
- end
-
- context "when bank_or_building_society has changed" do
- let(:claim_params) { {bank_or_building_society: "building_society"} }
-
- it "resets dependent answers" do
- expect { expect(form.save).to be true }.to(
- change { journey_session.reload.answers.banking_name }.to(nil).and(
- change { journey_session.reload.answers.bank_account_number }.to(nil)
- ).and(
- change { journey_session.reload.answers.bank_sort_code }.to(nil)
- ).and(
- change { journey_session.reload.answers.building_society_roll_number }.to(nil)
- )
- )
- end
- end
- end
- end
-
- describe "for TeacherStudentLoanReimbursement journey" do
- include_examples "bank_or_building_society_form", Journeys::TeacherStudentLoanReimbursement
- end
-
- describe "for AdditionalPaymentsForTeaching journey" do
- include_examples "bank_or_building_society_form", Journeys::AdditionalPaymentsForTeaching
- end
-end
diff --git a/spec/helpers/admin/claims_helper_spec.rb b/spec/helpers/admin/claims_helper_spec.rb
index 628224d9b3..dc65513444 100644
--- a/spec/helpers/admin/claims_helper_spec.rb
+++ b/spec/helpers/admin/claims_helper_spec.rb
@@ -657,15 +657,6 @@
expect(code_msg(bank_account_verification_response, claim)).to eq "Error 400 - HMRC API failure. No checks have been completed on the claimant’s bank account details. Select yes to manually approve the claimant’s bank account details"
end
end
-
- context "429 error with building society" do
- let(:claim) { create(:claim, :submitted, bank_or_building_society: :building_society) }
- let(:bank_account_verification_response) { Hmrc::BankAccountVerificationResponse.new(OpenStruct.new({code: 429, body: {}.to_json})) }
-
- it "returns message with code and bank account" do
- expect(code_msg(bank_account_verification_response, claim)).to eq "Error 429 - HMRC API failure. No checks have been completed on the claimant’s building society details. Select yes to manually approve the claimant’s building society details"
- end
- end
end
describe "#sort_code_msg" do
diff --git a/spec/models/journeys/additional_payments_for_teaching/slug_sequence_spec.rb b/spec/models/journeys/additional_payments_for_teaching/slug_sequence_spec.rb
index c583945c73..3b12f02512 100644
--- a/spec/models/journeys/additional_payments_for_teaching/slug_sequence_spec.rb
+++ b/spec/models/journeys/additional_payments_for_teaching/slug_sequence_spec.rb
@@ -324,22 +324,6 @@
end
end
- context "when claim payment details are 'personal bank account'" do
- it "excludes the 'building-society-account' slug" do
- journey_session.answers.bank_or_building_society = :personal_bank_account
-
- expect(slug_sequence.slugs).not_to include("building-society-account")
- end
- end
-
- context "when claim payment details are 'building society'" do
- it "excludes the 'personal-bank-account' slug" do
- journey_session.answers.bank_or_building_society = :building_society
-
- expect(slug_sequence.slugs).not_to include("personal-bank-account")
- end
- end
-
context "when Teacher ID is disabled on the policy configuration" do
let(:teacher_id_enabled) { false }
diff --git a/spec/models/journeys/teacher_student_loan_reimbursement/slug_sequence_spec.rb b/spec/models/journeys/teacher_student_loan_reimbursement/slug_sequence_spec.rb
index a7ee49df7d..32382dfc45 100644
--- a/spec/models/journeys/teacher_student_loan_reimbursement/slug_sequence_spec.rb
+++ b/spec/models/journeys/teacher_student_loan_reimbursement/slug_sequence_spec.rb
@@ -44,22 +44,6 @@
expect(slug_sequence.slugs).not_to include("current-school")
end
- context "when claim payment details are 'personal bank account'" do
- it "excludes the 'building-society-account' slug" do
- journey_session.answers.bank_or_building_society = :personal_bank_account
-
- expect(slug_sequence.slugs).not_to include("building-society-account")
- end
- end
-
- context "when claim payment details are 'building society'" do
- it "excludes the 'personal-bank-account' slug" do
- journey_session.answers.bank_or_building_society = :building_society
-
- expect(slug_sequence.slugs).not_to include("personal-bank-account")
- end
- end
-
context "when 'provide_mobile_number' is 'No'" do
it "excludes the 'mobile-number' slug" do
journey_session.answers.provide_mobile_number = false
diff --git a/spec/support/get_a_teacher_relocation_payment/step_helpers.rb b/spec/support/get_a_teacher_relocation_payment/step_helpers.rb
index fe41031663..d2a69683b3 100644
--- a/spec/support/get_a_teacher_relocation_payment/step_helpers.rb
+++ b/spec/support/get_a_teacher_relocation_payment/step_helpers.rb
@@ -225,12 +225,6 @@ def and_i_provide_my_mobile_number
end
def and_i_provide_my_personal_bank_details
- assert_on_bank_or_building_society_page!
-
- choose "Personal bank account"
-
- click_button("Continue")
-
assert_on_personal_bank_account_page!
fill_in("Name on your account", with: "Walter Skinner")
@@ -242,26 +236,6 @@ def and_i_provide_my_personal_bank_details
click_button("Continue")
end
- def and_i_provide_my_building_society_details
- assert_on_bank_or_building_society_page!
-
- choose "Building society"
-
- click_button("Continue")
-
- assert_on_building_society_account_page!
-
- fill_in "Name on your account", with: "Walter Skinner"
-
- fill_in("Sort code", with: "123456")
-
- fill_in("Account number", with: "12345678")
-
- fill_in("Building society roll number", with: "12345678")
-
- click_button("Continue")
- end
-
def and_i_complete_the_payroll_gender_step
assert_on_payroll_gender_step!
@@ -350,18 +324,10 @@ def assert_on_provider_mobile_number_page!
expect(page).to have_text("Would you like to provide your mobile number?")
end
- def assert_on_bank_or_building_society_page!
- expect(page).to have_text("What account do you want the money paid into?")
- end
-
def assert_on_personal_bank_account_page!
expect(page).to have_text("Enter your personal bank account details")
end
- def assert_on_building_society_account_page!
- expect(page).to have_text("Enter your building society details")
- end
-
def assert_on_payroll_gender_step!
expect(page).to have_text(
"How is your gender recorded on your school’s payroll system?"
diff --git a/spec/support/journey_answers_presenter_shared_examples.rb b/spec/support/journey_answers_presenter_shared_examples.rb
index b083fe102c..5a44291df8 100644
--- a/spec/support/journey_answers_presenter_shared_examples.rb
+++ b/spec/support/journey_answers_presenter_shared_examples.rb
@@ -186,7 +186,6 @@
create(
:additional_payments_session,
answers: {
- bank_or_building_society: "personal_bank_account",
bank_sort_code: "123456",
bank_account_number: "12345678",
banking_name: "Jo Bloggs"
@@ -199,7 +198,6 @@
context "when a personal bank account is selected" do
it "returns an array of questions and answers for displaying to the user for review" do
expected_answers = [
- [I18n.t("questions.bank_or_building_society"), "Personal bank account", "bank-or-building-society"],
["Name on bank account", "Jo Bloggs", "personal-bank-account"],
["Bank sort code", "123456", "personal-bank-account"],
["Bank account number", "12345678", "personal-bank-account"]
@@ -208,32 +206,5 @@
expect(answers).to eq expected_answers
end
end
-
- context "when a building society is selected" do
- let(:journey_session) do
- create(
- :additional_payments_session,
- answers: {
- bank_or_building_society: "building_society",
- bank_sort_code: "659007",
- bank_account_number: "90770224",
- banking_name: "David Badger-Hillary",
- building_society_roll_number: "5890/87654321"
- }
- )
- end
-
- it "returns an array of questions and answers for displaying to the user for review" do
- expected_answers = [
- [I18n.t("questions.bank_or_building_society"), "Building society", "bank-or-building-society"],
- ["Name on bank account", "David Badger-Hillary", "building-society-account"],
- ["Bank sort code", "659007", "building-society-account"],
- ["Bank account number", "90770224", "building-society-account"],
- ["Building society roll number", "5890/87654321", "building-society-account"]
- ]
-
- expect(answers).to eq expected_answers
- end
- end
end
end