-
-
Notifications
You must be signed in to change notification settings - Fork 527
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
4978 rework donation site import #5079
base: main
Are you sure you want to change the base?
4978 rework donation site import #5079
Conversation
…8' into rework_donation_site_import_#4978
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.
Hi @someykoku
Thanks for this! I've done some functionality testing. This basically works well, but we need some tweaks (see above as well.) When those are addressed, I'll pass it on for final technical review.
public/donation_sites_template.csv
Outdated
Donation Site 2,456 Donation Site Way,Jane Smith,[email protected],234-567-8901 | ||
Donation Site 3,789 Donation Site Way,Bob Johnson,[email protected],345-678-9012 | ||
Donation Site 3,789 Donation Site Way,Bob Johnson,[email protected],345-678-9012 |
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.
Let's not give them a duplicated donation site as an example that they should follow. (please remove the second Donation site 3 or change it up)
app/models/donation_site.rb
Outdated
@@ -22,7 +22,8 @@ class DonationSite < ApplicationRecord | |||
|
|||
belongs_to :organization | |||
|
|||
validates :name, :address, presence: true | |||
validates :name, :address, :phone, presence: true |
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.
Phone is not mandatory -- this is breaking bin/setup and a lot of the sites in production have no contact information.
spec/models/donation_site_spec.rb
Outdated
it { should validate_presence_of(:address) } | ||
it { should validate_length_of(:contact_name).is_at_least(3) } |
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.
Note that contact name is allowed to be blank.
…ank, phone is not mandatory, fixed tests
…8' into rework_donation_site_import_#4978
Resolves #4978
Description
Type of change
How Has This Been Tested?
Screenshots