Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FYST-1728 Fix MD client address updates #5476

Merged
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def document
xml.AddressLine1Txt sanitize_for_xml(@intake.permanent_street, 30)
xml.AddressLine2Txt sanitize_for_xml(@intake.permanent_apartment, 30) if @intake.permanent_apartment.present?
xml.CityNm sanitize_for_xml(@intake.permanent_city, 20)
xml.StateAbbreviationCd @intake.direct_file_data.mailing_state.upcase
xml.StateAbbreviationCd "MD"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirmed that although the DF can send us the out of state mailing_state -- if the user confirms :permanent_address_outside_md it will lead the user to an ineligible screen. Which means that by the time we fill out the MD502, the user should've provided an address within MD (state hard coded on permanent address controller).

xml.ZIPCd sanitize_zipcode(@intake.permanent_zip)
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,40 +72,27 @@
expect(xml.at("MarylandAddress ZIPCd").text).to eq "214011234"
end

context "when user had an out-of-state permanent address from DF" do
context "when user had an out-of-state permanent address from DF and enters a new address in MD" do
before do
intake.direct_file_data.mailing_city = "Denver"
intake.direct_file_data.mailing_state = "CO"
intake.direct_file_data.mailing_zip = "80212-1234"
intake.confirmed_permanent_address_no!
intake.permanent_street = "313 Poppy Street"
intake.permanent_apartment = "Apt A"
intake.permanent_city = "Baltimore"
intake.permanent_zip = "21201-1234"
end

it "outputs their DF address as their physical address" do
expect(xml.at("MarylandAddress AddressLine1Txt").text).to eq "312 Poppy Street"
expect(xml.at("MarylandAddress AddressLine2Txt").text).to eq "Apt B"
expect(xml.at("MarylandAddress CityNm").text).to eq "Denver"
expect(xml.at("MarylandAddress StateAbbreviationCd").text).to eq "CO"
expect(xml.at("MarylandAddress ZIPCd").text).to eq "802121234"
it "outputs their entered address as their physical address" do
expect(xml.at("MarylandAddress AddressLine1Txt").text).to eq "313 Poppy Street"
expect(xml.at("MarylandAddress AddressLine2Txt").text).to eq "Apt A"
expect(xml.at("MarylandAddress CityNm").text).to eq "Baltimore"
expect(xml.at("MarylandAddress StateAbbreviationCd").text).to eq "MD"
expect(xml.at("MarylandAddress ZIPCd").text).to eq "212011234"
end
end
end

context "when the user has entered a different permanent address" do
before do
intake.confirmed_permanent_address_no!
intake.permanent_street = "313 Poppy Street"
intake.permanent_apartment = "Apt A"
intake.permanent_city = "Baltimore"
intake.permanent_zip = "21201-1234"
end

it "outputs their entered address as their physical address" do
expect(xml.at("MarylandAddress AddressLine1Txt").text).to eq "313 Poppy Street"
expect(xml.at("MarylandAddress AddressLine2Txt").text).to eq "Apt A"
expect(xml.at("MarylandAddress CityNm").text).to eq "Baltimore"
expect(xml.at("MarylandAddress StateAbbreviationCd").text).to eq "MD"
expect(xml.at("MarylandAddress ZIPCd").text).to eq "212011234"
end
end
end

context "when mailing address has the apt" do
Expand Down
Loading