-
-
Notifications
You must be signed in to change notification settings - Fork 498
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
Resolves #4686 add another bank to seed #4826
base: main
Are you sure you want to change the base?
Resolves #4686 add another bank to seed #4826
Conversation
…ted new partner with new bank
…all orgs, removed redundant Product Drives section
…storage locations are selected to accommodate there being storage locations for multiple orgs
…or pdx_org and sc_org
Hey @Benjamin-Couey - I'm liking what I'm seeing from a functional pov. With the second city items, I have one question, though. Are we guaranteed to have at least one each of donation, purchase, distribution, and request among those 4 items? My concern is false positives when we are using them for manual testing -- that, with these extra items, we would rely on there being instances with them, and if there aren't, we might assume that everything is fine. |
@cielf There is currently no guarantee that the second city items will be used for the donations, purchases, distributions, and requests. I can work on explicitly adding examples of those records using the second city items. |
(Nods) Yes please. |
Resolves #4685
Description
This PR modifies the
db/seeds.rb
file to add another diaper bank with a partner and other associated records.CONTRIBUTING.md
was also updated to include the login information for the new diaper bank and partner.In total, the following records were added to the seed:
Organization
Second City Essentials BankBaseItem
, named "Second City Item 1"User
s for the new bank, "[email protected]" and "[email protected]"Donation
s andDistribution
s for the new bankPurchase
s for the new bankDonationSite
s for the new bank, based on the city and state of the bank.StorageLocation
s for the new bank.Unit
s,ProductDrive
s,ProductDriveParticipant
s,Manufacturer
s, and 'Vendor's for the new bank.Partner
"Second City Senior Center"Request
s made by the new partner to the new bank (this was handled by exitingPartner
seeding code).The seed uses both hand-written values and the
Faker
library to populate addresses, emails, etc. When creating entirely new records, I favoredFaker
for the sake of better looking demos but didn't update existing hand-written values.For most of the records associated with an
Organization
, the seed only created records for the Pawnee Diaper Bank. I updated these sections to only create records for the new bank and not the existing SF Diaper Bank as they was not requested by the issue. I tried to modify the code so that it would be easy to define a list of banks for which these records should be created.Type of change
How Has This Been Tested?
As far as I could tell, there were no automated tests associated with the seed and so relied on manual verification. I verified that
rake db:reset
runs without issues with the modified seed and manually verified that the database contained the new records associated with the new bank.I created a unit test for a utility function added to
Organization
.