Skip to content
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
10 changes: 4 additions & 6 deletions app/views/idv/verify_info/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,10 @@ locals:
<dt class="display-inline"> <%= t('idv.form.address1') %>: </dt>
<dd class="display-inline margin-left-0"> <%= @pii[:address1] %> </dd>
</div>
<% if @pii[:address2].present? %>
<div>
<dt class="display-inline"> <%= t('idv.form.address2') %>: </dt>
<dd class="display-inline margin-left-0"> <%= @pii[:address2] %> </dd>
</div>
<% end %>
<div>
<dt class="display-inline"> <%= t('idv.form.address2') %>: </dt>
<dd class="display-inline margin-left-0"> <%= @pii[:address2].presence %> </dd>
</div>
<div>
<dt class="display-inline"> <%= t('idv.form.city') %>: </dt>
<dd class="display-inline margin-left-0"> <%= @pii[:city] %> </dd>
Expand Down
19 changes: 19 additions & 0 deletions spec/controllers/idv/verify_info_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down