This accomplishes two things: making the object creation more explicit (this is
a user object) and also not creating a hidden organization in the background. In
tests, the organization a volunteer belongs to is used in other parts of the
test, so implicitly creating it is most likely just going to create an unused
record. It's better in my opinion to explicitly create the record.
Convert user factories to traits #136
el-user-factory-traits into main Love the inline org creation!
@ -23,3 +19,3 @@
it "redirects to the org list page when user is an org admin with multiple orgs" do
sign_in @multiple_orgs_admin
org1 = create(:organization)
➕ (can't endorse this enough, let's just say... from experience)
@ -8,3 +8,3 @@
describe "validate_email" do
it "returns true for valid email address" do
user = create(:volunteer, email: "foo@bar.com")
user = create(:user, :volunteer, email: "foo@bar.com")
Just curious about your workflow for these find/replace tasks, are you still using something "grep/sed"-like? Have you seen ast-grep before? I've found it incredibly helpful, esp. for api change upgrades!
I've tried to wrap my head around ast-grep several times but I can't seem to grok it's syntax. It seems like such a good idea but a terrible (for me) api. If you have good resources outside their official docs, please share them.
I used okapi which is just a find and replace interface, but it worked well for finding these.
e5573b603c
a8a0af6ffd
The test flake there is a weird one, but not uncommon. I haven't been able to track it down.
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?