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
22 changes: 13 additions & 9 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -394,22 +394,26 @@
get '/in_person/:step' => 'in_person#show', as: :in_person_step
put '/in_person/:step' => 'in_person#update'

# deprecated routes
get '/confirmations' => 'personal_key#show'
post '/confirmations' => 'personal_key#update'
end
get '/by_mail' => 'gpo_verify#index', as: :gpo_verify
post '/by_mail' => 'gpo_verify#create'
get '/by_mail/confirm_start_over' => 'confirm_start_over#index',
as: :confirm_start_over

get '/account/verify' => 'idv/gpo_verify#index', as: :idv_gpo_verify
post '/account/verify' => 'idv/gpo_verify#create'
get '/account/verify/confirm_start_over' => 'idv/confirm_start_over#index', as: :idv_confirm_start_over
if FeatureManagement.gpo_verification_enabled?
scope '/verify', module: 'idv', as: 'idv' do
if FeatureManagement.gpo_verification_enabled?
get '/usps' => 'gpo#index', as: :gpo
put '/usps' => 'gpo#create'
post '/usps' => 'gpo#update'
end

# deprecated routes
get '/confirmations' => 'personal_key#show'
post '/confirmations' => 'personal_key#update'
Comment on lines +408 to +410
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tangential to this PR, can we delete these? When/how can we tell they're ready for deletion? I keep eyeing them.

I'll pull this down and try it tomorrow.

end

# Old paths to GPO outside of IdV.
get '/account/verify', to: redirect('/verify/by_mail')
get '/account/verify/confirm_start_over', to: redirect('/verify/by_mail/confirm_start_over')

root to: 'users/sessions#new'
end

Expand Down
2 changes: 1 addition & 1 deletion spec/presenters/idv/gpo_presenter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
context 'when the user has a pending profile' do
it 'returns the verify account path' do
create(:profile, user: user, gpo_verification_pending_at: 1.day.ago)
expect(subject.fallback_back_path).to eq('/account/verify')
expect(subject.fallback_back_path).to eq('/verify/by_mail')
end
end

Expand Down
16 changes: 16 additions & 0 deletions spec/requests/redirects_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,20 @@
expect(response).to redirect_to('/account/verify')
end
end

describe '/account/verify' do
it 'redirects to /verify/by_mail' do
get '/account/verify'

expect(response).to redirect_to('/verify/by_mail')
end
end

describe '/account/verify/confirm_start_over' do
it 'redirects to /verify/by_mail/confirm_start_over' do
get '/account/verify/confirm_start_over'

expect(response).to redirect_to('/verify/by_mail/confirm_start_over')
end
end
end