mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: add additional email to tests and clean up resulting mess
This commit is contained in:
@@ -2,3 +2,8 @@ Fabricator(:user_email) do
|
||||
email { sequence(:email) { |i| "bruce#{i}@wayne.com" } }
|
||||
primary true
|
||||
end
|
||||
|
||||
Fabricator(:alternate_email, from: :user_email) do
|
||||
email { sequence(:email) { |i| "bwayne#{i}@wayne.com" } }
|
||||
primary false
|
||||
end
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Fabricator(:user_stat) do
|
||||
end
|
||||
|
||||
Fabricator(:user) do
|
||||
Fabricator(:user_single_email, class_name: :user) do
|
||||
name 'Bruce Wayne'
|
||||
username { sequence(:username) { |i| "bruce#{i}" } }
|
||||
email { sequence(:email) { |i| "bruce#{i}@wayne.com" } }
|
||||
@@ -11,6 +11,10 @@ Fabricator(:user) do
|
||||
active true
|
||||
end
|
||||
|
||||
Fabricator(:user, from: :user_single_email) do
|
||||
after_create { |user| Fabricate(:alternate_email, user: user) }
|
||||
end
|
||||
|
||||
Fabricator(:coding_horror, from: :user) do
|
||||
name 'Coding Horror'
|
||||
username 'CodingHorror'
|
||||
|
||||
Reference in New Issue
Block a user