identity-vault/spec/factories/identities.rb
nora 9998147a4e
epic: overhaul program management experience (#188)
* temp commit

* lemme do it

* nope

* let them do it too

* collab invite model

* better visuals on progman

* waow

* danger will robinson

* show apps on backend & link user

* first pass on app auditability!

* no lastnaming admins

* async frame that shit!

* waugh

* can't add yourself

* fix reinvite

* sidebar badging

* lint...

* gotta be on the app!

* let that get rescued by applcon

* already in revoke_all_authorizations

* woag

* the routes you grew up with no longer exist

* what would the UI for that even be?

* sorch

* much better!

* frickin validations
2026-03-02 22:15:13 -05:00

29 lines
773 B
Ruby

FactoryBot.define do
factory :identity do
first_name { "Heidi" }
last_name { "Trashworth" }
sequence(:primary_email) { |n| "heidi#{n}@hackclub.com" }
birthday { Date.parse("2005-06-15") }
country { "US" }
phone_number { "+18028675309" }
sequence(:slack_id) { |n| "U#{n.to_s.rjust(8, '0')}" }
ysws_eligible { true }
legal_first_name { "Hakkuun" }
legal_last_name { "[WOULDN'T YOU LIKE TO KNOW]" }
trait :with_address do
after(:create) do |identity|
address = create(:address, identity: identity)
identity.update(primary_address: address)
end
end
trait :can_hq_officialize do
can_hq_officialize { true }
end
trait :developer do
developer_mode { true }
end
end
end