1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/factories/accounts.rb

20 lines
441 B
Ruby
Raw Normal View History

2018-12-01 21:03:19 -05:00
# frozen_string_literal: true
FactoryBot.define do
factory :guest_account, class: Account
2018-12-04 19:30:22 -05:00
factory :usual_account, parent: :guest_account do
2018-12-01 21:50:10 -05:00
association :user
2018-12-01 21:03:19 -05:00
end
2018-12-05 19:05:21 -05:00
2018-12-09 22:36:09 -05:00
factory :personal_account, parent: :usual_account do
association :person, factory: :initial_person
2018-12-09 22:36:09 -05:00
end
factory :superuser_account, parent: :personal_account do
2018-12-05 19:05:21 -05:00
after :create do |account, _evaluator|
account.add_role :superuser
end
end
2018-12-01 21:03:19 -05:00
end