-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add scopes for different conviction check states #304
Conversation
https://eaflood.atlassian.net/browse/WC-483 Now that we have workflow_states for conviction_sign_offs, we can use these to filter transient_registrations. This PR creates new scopes for the various states a conviction_sign_off can be in.
This scope should only return transient_registrations which have a conviction_sign_off with a workflow_state of :possible_match.
This scope should only return transient_registrations which have a conviction_sign_off with a workflow_state of :checks_in_progress.
This scope should only return transient_registrations which have a conviction_sign_off with a workflow_state of :approved.
This scope should only return transient_registrations which have a conviction_sign_off with a workflow_state of :rejected.
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.
Left as a comment to see if you are ok cleaning up my code to make things consistent.
Else we could create an issue and I'll resolve it when I grab 5 mins 😁
@@ -105,4 +105,82 @@ | |||
expect(WasteCarriersEngine::TransientRegistration.pending_approval).not_to include(in_progress_renewal) | |||
end | |||
end | |||
|
|||
describe "conviction check scopes" do |
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.
Be warned, this is essentially getting you to clean up my mess!
The way the tests are setup for the conviction check scopes differs from the way that's done in the rest of this file. I think within the same file we should aim to try and keep the pattern consistent. I'm happy to go with what you have done (what I did was based on my limited knowledge and abilities), but would you be ok as a bit of a 'boy scout exercise' to refactor the setup for the previous tests to match?
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.
Sure, makes sense! I'll have a bash now.
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.
Actually, I wonder if it would make more sense to do it as a separate PR, just to keep the commit history a bit clearer? Just started it and I don't think it'll take long but it will clutter up the diff.
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.
Makes sense. That talk really sparked something! 😁
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.
Just trying to practice what I preach in the retros 👼
New PR here: #305 I'll let you know once it's ready!
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.
With #305 underway, happy to stamp this with !
https://eaflood.atlassian.net/browse/WC-483
Now that we have workflow_states for conviction_sign_offs, we can use these to filter transient_registrations. This PR creates new scopes for the various states a conviction_sign_off can be in.