diff --git a/config/routes.rb b/config/routes.rb index ac15e1cb72d..f85d4a57bbd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -403,7 +403,7 @@ # deprecated routes get '/confirmations' => 'personal_key#show' post '/confirmations' => 'personal_key#update' - get '/doc_auth/:step' => 'welcome#show' + get '/doc_auth/:step', to: redirect('/verify/welcome') get '/doc_auth/link_sent/poll' => 'capture_doc_status#show' end diff --git a/spec/controllers/idv/welcome_controller_spec.rb b/spec/controllers/idv/welcome_controller_spec.rb index f0a3694c80e..f8da3e66d5f 100644 --- a/spec/controllers/idv/welcome_controller_spec.rb +++ b/spec/controllers/idv/welcome_controller_spec.rb @@ -27,16 +27,6 @@ end end - describe 'legacy redirect', type: :routing do - it 'redirects from /verify/doc_auth/:step to idv_welcome_url' do - expect(get('/verify/doc_auth/document_capture')).to route_to( - controller: 'idv/welcome', - action: 'show', - step: 'document_capture', - ) - end - end - describe '#show' do let(:analytics_name) { 'IdV: doc auth welcome visited' } let(:analytics_args) do diff --git a/spec/requests/redirects_spec.rb b/spec/requests/redirects_spec.rb index f89d4996334..29731ec6f22 100644 --- a/spec/requests/redirects_spec.rb +++ b/spec/requests/redirects_spec.rb @@ -40,4 +40,16 @@ expect(response).to redirect_to('/verify/by_mail/confirm_start_over') end end + + describe '/verify/doc_auth/:step' do + it 'redirects to /verify/welcome' do + get '/verify/doc_auth/document_capture' + + expect(response).to redirect_to('/verify/welcome') + + get '/verify/doc_auth/welcome' + + expect(response).to redirect_to('/verify/welcome') + end + end end