Tear down code for phone profile verification#2369
Conversation
|
This commit tears out the unused code. I'd like to go back and move the profile verification logic into the IdV namespace and pull out some of the branching. That seemed like it would add too much bloat to this PR so I'm going to hold off for now. |
63ca174 to
31120e1
Compare
**Why:** The phone verification process for IdV used to mirror USPS verification. We changed that functionality, but never properly cleaned up some of the dead code. This commit does that, and also prepares to drop the unnecessary `phone_confirmed` column from the profile model.
|
I'm confused about why code climate is saying coverage has decreased? It's telling me it's gone down in the VerifyProfilePhoneController, which is a file I deleted. |
|
The code coverage check here looks like it is failing since I deleted a whole bunch of covered code, reducing the total code coverage percentage. I don't think I introduced any uncovered paths. |
|
It's expected for the ratio to decrease if we subtract the same number from the numerator and denominator (e.g., all lines of code removed were covered). |
monfresh
left a comment
There was a problem hiding this comment.
LGTM. I love code removals.
Why: The phone verification process for IdV used to mirror USPS
verification. We changed that functionality, but never properly cleaned
up some of the dead code. This commit does that, and also prepares to
drop the unnecessary
phone_confirmedcolumn from the profile model.Hi! Before submitting your PR for review, and/or before merging it, please
go through the following checklist:
For DB changes, check for missing indexes, check to see if the changes
affect other apps (such as the dashboard), make sure the DB columns in the
various environments are properly populated, coordinate with devops, plan
migrations in separate steps.
For route changes, make sure GET requests don't change state or result in
destructive behavior. GET requests should only result in information being
read, not written.
For encryption changes, make sure it is compatible with data that was
encrypted with the old code.
For secrets changes, make sure to update the S3 secrets bucket with the
new configs in all environments.
Do not disable Rubocop or Reek offenses unless you are absolutely sure
they are false positives. If you're not sure how to fix the offense, please
ask a teammate.
When reading data, write tests for nil values, empty strings,
and invalid formats.
When calling
redirect_toin a controller, use_url, not_path.When adding user data to the session, use the
user_sessionhelperinstead of the
sessionhelper so the data does not persist beyond the user'ssession.
When adding a new controller that requires the user to be fully
authenticated, make sure to add
before_action :confirm_two_factor_authenticated.