-
Notifications
You must be signed in to change notification settings - Fork 166
LG-14653 | Log state_id_type on doc auth result event #11328
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
6 commits
Select commit
Hold shift + click to select a range
e8e71b9
LG-14653 | Log state_id_type on proofing result event
n1zyy 1cb41c0
Merge branch 'main' into mattw/LG-14653_log_docauth_id_type
n1zyy 6e6a0cc
Update spec/controllers/idv/verify_info_controller_spec.rb
n1zyy 30be39e
Test fixes
n1zyy 9384d43
Merge branch 'main' into mattw/LG-14653_log_docauth_id_type
n1zyy 2cd4729
Merge branch 'main' into mattw/LG-14653_log_docauth_id_type
n1zyy 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
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.
Uh oh!
There was an error while loading. Please reload this page.
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 couldn't find prior art for handling this situation...
I basically wanted:
except that's not valid code. I started nesting hash_including but it got really unwieldy fast.
hash_includingdoesn't look deep in the hash, e.g., just doinghash_including(state_id_type: 'drivers_license')expects a top-level key namedstate_id_type; it doesn't dig down recursively until it finds a match.The test above feels inelegant, except compared to every other option I tried.
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.
we have one double-nested hash-including here:
identity-idp/spec/features/idv/analytics_spec.rb
Line 311 in 0e9bba2
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.
but I think that you're right, doing a point-check is clearer here
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.
It's almost like we need
have_logged_eventto support a pattern like: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.
@lmgeorge Something like this came up in the
#rspec-leaguechannel when I asked about this, even with some example code. I'm reluctant to add it, though. I feel like it would normalize having deeply-nested hashes for important things, but I feel like it's an antipattern.I think I agree more with the comment in that thread that something being clunky to test is often a smell that the code (or here, data structure) is too convoluted. That's not an easy fix in this PR, though.
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.
Agreed. This is one of those do you fix "all the things" or just try to make your current need work. Either way, adding a custom matcher or dramatically restructuring the analytics event is beyond the scope of this PR.