mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Ensure unique identifiers in fabricated objects in tests (#3173)
This commit is contained in:
parent
6c1122a1d9
commit
812fe90eca
@ -1,4 +1,4 @@
|
|||||||
Fabricator(:account_domain_block) do
|
Fabricator(:account_domain_block) do
|
||||||
account_id 1
|
account
|
||||||
domain "MyString"
|
domain 'example.com'
|
||||||
end
|
end
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Fabricator(:account) do
|
Fabricator(:account) do
|
||||||
username { Faker::Internet.user_name(nil, %w(_)) }
|
username { sequence(:username) { |i| "#{Faker::Internet.user_name(nil, %w(_))}#{i}" } }
|
||||||
last_webfingered_at { Time.now.utc }
|
last_webfingered_at { Time.now.utc }
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
Fabricator(:preview_card) do
|
Fabricator(:preview_card) do
|
||||||
status_id 1
|
status
|
||||||
url "MyString"
|
url 'http://example.com'
|
||||||
html "MyText"
|
|
||||||
end
|
end
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
Fabricator(:tag) do
|
Fabricator(:tag) do
|
||||||
name "MyString"
|
name { sequence(:hashtag) { |i| "#{Faker::Lorem.word}#{i}" } }
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Fabricator(:user) do
|
Fabricator(:user) do
|
||||||
account
|
account
|
||||||
email { Faker::Internet.email }
|
email { sequence(:email) { |i| "#{i}#{Faker::Internet.email}" } }
|
||||||
password "123456789"
|
password "123456789"
|
||||||
confirmed_at { Time.now }
|
confirmed_at { Time.now }
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user