summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorMatt Jankowski <matt@jankowski.online>2024-05-31 05:54:11 -0400
committerGitHub <noreply@github.com>2024-05-31 09:54:11 +0000
commit4d047b95aed493bc29e36b6958bfe362607507c6 (patch)
tree0cb72b0a1eaf451d83d218866726415f6abb8428 /spec
parenta22865a352cca312a50556fd38ce2d5764ecc4dc (diff)
Use more direct attribute handling in `User` fabricator (#30495)
Diffstat (limited to 'spec')
-rw-r--r--spec/fabricators/user_fabricator.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/fabricators/user_fabricator.rb b/spec/fabricators/user_fabricator.rb
index 9031d5cd042..0df7caea60c 100644
--- a/spec/fabricators/user_fabricator.rb
+++ b/spec/fabricators/user_fabricator.rb
@@ -1,7 +1,12 @@
# frozen_string_literal: true
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}" } }
password '123456789'
confirmed_at { Time.zone.now }