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
2 changes: 1 addition & 1 deletion app/controllers/idv/how_to_verify_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def self.step_info
controller: controller_name,
next_steps: [:hybrid_handoff, :document_capture],
preconditions: ->(idv_session:, user:) do
self.enabled?
self.enabled? && idv_session.idv_consent_given
end,
undo_step: ->(idv_session:, user:) {}, # clear any saved data
Copy link
Copy Markdown
Contributor

@soniaconnolly soniaconnolly Nov 20, 2023

Choose a reason for hiding this comment

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

This PR looks good, and you could go ahead and add idv_session.skip_doc_auth = nil for undo_step.

Edit: You also need before_action :confirm_document_capture_not_complete at the top.
Edit again: Gina and I added these two things on her PR.

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.

@svalexander I will take care of this. In PR # 9598, I am setting the value so I think it makes sense to unset it in the same PR.

)
Expand Down
13 changes: 13 additions & 0 deletions spec/controllers/idv/how_to_verify_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
stub_sign_in(user)
stub_analytics
subject.idv_session.welcome_visited = true
subject.idv_session.idv_consent_given = true
end

describe '#step_info' do
Expand All @@ -32,6 +33,18 @@

expect(response).to render_template :show
end

context 'agreement step not completed' do
before do
subject.idv_session.idv_consent_given = nil
end

it 'redirects to agreement path' do
get :show

expect(response).to redirect_to idv_agreement_path
end
end
end

describe '#update' do
Expand Down