From 916f5a77eaeb52cb308b89ebc7b6477cdea383c2 Mon Sep 17 00:00:00 2001 From: Nathan Wright Date: Fri, 3 Feb 2023 12:44:18 -0700 Subject: [PATCH] Update regional office param (#11706) --- app/models/saved_claim/education_benefits.rb | 7 ++++++- spec/models/saved_claim/education_benefits_spec.rb | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/models/saved_claim/education_benefits.rb b/app/models/saved_claim/education_benefits.rb index 08ae6f0d185..f0fa9119374 100644 --- a/app/models/saved_claim/education_benefits.rb +++ b/app/models/saved_claim/education_benefits.rb @@ -51,11 +51,16 @@ def send_5490_confirmation_email 'benefit' => benefit, 'date_submitted' => Time.zone.today.strftime('%B %d, %Y'), 'confirmation_number' => education_benefits_claim.confirmation_number, - 'regional_office_details' => education_benefits_claim.regional_office + 'regional_office_address' => regional_office_address } ) end + def regional_office_address + (_title, *address) = education_benefits_claim.regional_office.split("\n") + address.join("\n") + end + def add_education_benefits_claim build_education_benefits_claim if education_benefits_claim.nil? end diff --git a/spec/models/saved_claim/education_benefits_spec.rb b/spec/models/saved_claim/education_benefits_spec.rb index 4be2c4bd5be..14e89919d48 100644 --- a/spec/models/saved_claim/education_benefits_spec.rb +++ b/spec/models/saved_claim/education_benefits_spec.rb @@ -40,7 +40,7 @@ 'benefit' => 'The Fry Scholarship (Chapter 33)', 'date_submitted' => Time.zone.today.strftime('%B %d, %Y'), 'confirmation_number' => confirmation_number, - 'regional_office_details' => "VA Regional Office\nP.O. Box 4616\nBuffalo, NY 14240-4616" + 'regional_office_address' => "P.O. Box 4616\nBuffalo, NY 14240-4616" } ) end @@ -61,7 +61,7 @@ 'benefit' => 'Survivors’ and Dependents’ Educational Assistance (DEA, Chapter 35)', 'date_submitted' => Time.zone.today.strftime('%B %d, %Y'), 'confirmation_number' => confirmation_number, - 'regional_office_details' => "VA Regional Office\nP.O. Box 4616\nBuffalo, NY 14240-4616" + 'regional_office_address' => "P.O. Box 4616\nBuffalo, NY 14240-4616" } ) end