Skip to content
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

Conversation

thejonroberts
Copy link
Contributor

@thejonroberts thejonroberts commented Sep 25, 2024

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.

@github-actions github-actions bot added ruby Pull requests that update Ruby code Tests! 🎉💖👏 labels Sep 25, 2024
@thejonroberts thejonroberts force-pushed the contact-form-refactor-prep-spec-changes branch from 8309982 to 5728305 Compare September 25, 2024 04:48
@thejonroberts thejonroberts changed the title Spec changes - case contact form prep CaseContact validates usage and spec changes - case contact form prep Sep 25, 2024
@thejonroberts thejonroberts marked this pull request as ready for review September 25, 2024 05:07
@thejonroberts thejonroberts mentioned this pull request Sep 25, 2024
2 tasks
@@ -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]
Copy link
Contributor Author

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused

Copy link
Collaborator

@elasticspoon elasticspoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines -49 to +50
trait :with_disasllow_reimbursement do
trait :with_disallow_reimbursement do
Copy link
Collaborator

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)] }
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

@elasticspoon elasticspoon merged commit 8ffa578 into rubyforgood:main Sep 26, 2024
17 checks passed
@thejonroberts thejonroberts deleted the contact-form-refactor-prep-spec-changes branch September 26, 2024 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ruby Pull requests that update Ruby code Tests! 🎉💖👏
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants