Skip to content

Commit

Permalink
Update to use legacy language
Browse files Browse the repository at this point in the history
  • Loading branch information
Sgtpluck committed Sep 30, 2024
1 parent bcb4474 commit b1b77c3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/presenters/account_show_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def formatted_ipp_due_date
I18n.l(user.pending_in_person_enrollment.due_date, format: :event_date)
end

def formatted_nonfacial_match_idv_date
def formatted_legacy_idv_date
I18n.l(user.active_profile.created_at, format: :event_date)
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/accounts/_identity_verification.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<%= t('account.index.verification.you_verified_your_identity_html', sp_name: @presenter.user.active_profile.initiating_service_provider&.friendly_name || APP_NAME) %>
<% end %>
<% elsif @presenter.active_profile? %>
<%= t('account.index.verification.nonbiometric_verified_html', app_name: APP_NAME, date: @presenter.formatted_nonfacial_match_idv_date) %>
<%= t('account.index.verification.nonbiometric_verified_html', app_name: APP_NAME, date: @presenter.formatted_legacy_idv_date) %>
<% elsif @presenter.sp_name || @presenter.user.pending_profile.initiating_service_provider %>
<%= t('account.index.verification.finish_verifying_html', sp_name: @presenter.sp_name || @presenter.user.pending_profile.initiating_service_provider.friendly_name) %>
<% else %>
Expand Down
6 changes: 3 additions & 3 deletions spec/presenters/account_show_presenter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,13 @@
end
end

describe '#formatted_nonfacial_match_idv_date' do
describe '#formatted_legacy_idv_date' do
let(:user) { build(:user, :proofed_with_selfie) }

subject(:formatted_nonfacial_match_idv_date) { presenter.formatted_nonfacial_match_idv_date }
subject(:formatted_legacy_idv_date) { presenter.formatted_legacy_idv_date }

it 'formats a date string' do
expect { Date.parse(formatted_nonfacial_match_idv_date) }.not_to raise_error
expect { Date.parse(formatted_legacy_idv_date) }.not_to raise_error
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
t(
'account.index.verification.nonbiometric_verified_html',
app_name: APP_NAME,
date: @presenter.formatted_nonfacial_match_idv_date,
date: @presenter.formatted_legacy_idv_date,
),
),
)
Expand Down

0 comments on commit b1b77c3

Please sign in to comment.