-
Notifications
You must be signed in to change notification settings - Fork 166
Refactor the IdV step concern to no longer check for an applicant #7840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
c536bd6
Refactor the IdV step concern to no longer check for an applicant
jmhooper 2bf4ee4
forgot a controller spec
jmhooper 0c34b35
add a test to the phone controller
jmhooper bf4fa84
Merge branch 'main' into jmhooper-refactor-idv-step-concern
jmhooper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,44 +12,6 @@ class StepController < ApplicationController | |
| end | ||
| end | ||
|
|
||
| describe '#confirm_idv_session_started' do | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These tests don't make sense in the post-FSM world as described in the pull request description. I added a test to the phone controller spec to test the equivalent logic. The review controller already had a matching test. |
||
| controller Idv::StepController do | ||
| before_action :confirm_idv_session_started | ||
|
|
||
| def show | ||
| render plain: 'Hello' | ||
| end | ||
| end | ||
|
|
||
| before(:each) do | ||
| stub_sign_in(user) | ||
| routes.draw do | ||
| get 'show' => 'idv/step#show' | ||
| end | ||
| end | ||
|
|
||
| context 'user has not started IdV session' do | ||
| it 'redirects to a previous step url' do | ||
| get :show | ||
|
|
||
| expect(response).to redirect_to(idv_verify_info_url) | ||
| end | ||
| end | ||
|
|
||
| context 'user has started IdV session' do | ||
| before do | ||
| idv_session.applicant = { first_name: 'Jane' } | ||
| allow(subject).to receive(:idv_session).and_return(idv_session) | ||
| end | ||
|
|
||
| it 'allows request' do | ||
| get :show | ||
|
|
||
| expect(response.body).to eq 'Hello' | ||
| end | ||
| end | ||
| end | ||
|
|
||
| describe '#confirm_idv_needed' do | ||
| controller Idv::StepController do | ||
| before_action :confirm_idv_needed | ||
|
|
@@ -70,7 +32,6 @@ def show | |
| before do | ||
| allow(user).to receive(:active_profile).and_return(Profile.new) | ||
| allow(subject).to receive(:current_user).and_return(user) | ||
| allow(subject).to receive(:confirm_idv_session_started).and_return(true) | ||
| end | ||
|
|
||
| it 'redirects to activated page' do | ||
|
|
@@ -83,7 +44,6 @@ def show | |
| context 'user does not have active profile' do | ||
| before do | ||
| allow(subject).to receive(:current_user).and_return(user) | ||
| allow(subject).to receive(:confirm_idv_session_started).and_return(true) | ||
| end | ||
|
|
||
| it 'does not redirect to activated page' do | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we leaving the issue of the hard-coded doc_auth verify redirect for a separate PR? I checked the flow, and it redirects to verify/doc_auth/document_capture. https://cm-jira.usa.gov/browse/LG-8983
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to leave that to a separate PR