mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-29 08:29:03 +01:00
Use more direct attribute handling in User
fabricator (#30495)
This commit is contained in:
parent
a22865a352
commit
4d047b95ae
1 changed files with 6 additions and 1 deletions
|
@ -1,7 +1,12 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
Fabricator(:user) do
|
Fabricator(:user) do
|
||||||
account { Fabricate.build(:account, user: nil) }
|
account do |attrs|
|
||||||
|
Fabricate.build(
|
||||||
|
:account,
|
||||||
|
attrs.fetch(:account_attributes, {}).merge(user: nil)
|
||||||
|
)
|
||||||
|
end
|
||||||
email { sequence(:email) { |i| "#{i}#{Faker::Internet.email}" } }
|
email { sequence(:email) { |i| "#{i}#{Faker::Internet.email}" } }
|
||||||
password '123456789'
|
password '123456789'
|
||||||
confirmed_at { Time.zone.now }
|
confirmed_at { Time.zone.now }
|
||||||
|
|
Loading…
Reference in a new issue