diff --git a/app/views/idv/verify_info/show.html.erb b/app/views/idv/verify_info/show.html.erb index c69ec8c4530..7e4f4630b35 100644 --- a/app/views/idv/verify_info/show.html.erb +++ b/app/views/idv/verify_info/show.html.erb @@ -80,12 +80,10 @@ locals:
<%= t('idv.form.address1') %>:
<%= @pii[:address1] %>
- <% if @pii[:address2].present? %> -
-
<%= t('idv.form.address2') %>:
-
<%= @pii[:address2] %>
-
- <% end %> +
+
<%= t('idv.form.address2') %>:
+
<%= @pii[:address2].presence %>
+
<%= t('idv.form.city') %>:
<%= @pii[:city] %>
diff --git a/spec/controllers/idv/verify_info_controller_spec.rb b/spec/controllers/idv/verify_info_controller_spec.rb index 1209c2cc509..5a4509a1571 100644 --- a/spec/controllers/idv/verify_info_controller_spec.rb +++ b/spec/controllers/idv/verify_info_controller_spec.rb @@ -90,6 +90,25 @@ ) end + context 'address line 2' do + render_views + + it 'With address2 in PII, shows address line 2 input' do + flow_session[:pii_from_doc][:address2] = 'APT 3E' + get :show + + expect(response.body).to have_content(t('idv.form.address2')) + end + + it 'No address2 in PII, still shows address line 2 input' do + flow_session[:pii_from_doc][:address2] = nil + + get :show + + expect(response.body).to have_content(t('idv.form.address2')) + end + end + context 'when the user has already verified their info' do it 'redirects to the review controller' do controller.idv_session.profile_confirmation = true