-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
CaseContact validates usage and spec changes - case contact form prep #6061
CaseContact validates usage and spec changes - case contact form prep #6061
Conversation
8309982
to
5728305
Compare
@@ -90,7 +90,7 @@ | |||
member do | |||
post :restore | |||
end | |||
resources :form, controller: "case_contacts/form" | |||
resources :form, controller: "case_contacts/form", only: %i[show update] |
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.
these are the only actions in the controller, so this is not a behavioral change (except preventing controller errors)
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.
unused
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.
LGTM
trait :with_disasllow_reimbursement do | ||
trait :with_disallow_reimbursement 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.
lol
@@ -13,7 +13,7 @@ | |||
association :creator, factory: :user | |||
casa_case | |||
|
|||
contact_types { [create(:contact_type)] } | |||
contact_types { [association(:contact_type)] } |
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.
not familiar with this. what does it do vs just the create?
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 will play a little nicer with build/build_stubbed according to the docs, so fewer db hits in those situations.
What github issue is this PR for, if any?
Some changes that I could pull out of #6048 -- Mostly just tangential improvements I made that aren't directly required.
Changes some custom validations to use standard
validates
methods. Adds some conveniences to factories, and some resulting minor spec changes.