2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2019-02-10 12:24:22 +00:00
|
|
|
FactoryBot.define do
|
|
|
|
factory :type_lookup do
|
|
|
|
name do
|
|
|
|
# The following line ensures that the name generated by Faker
|
|
|
|
# does not conflict with any existing names in the DB.
|
|
|
|
# There's a special syntax for this
|
|
|
|
# (Faker::Verb.unique.exclude(:past_participle, [], Ticket::StateType.pluck(:name)),
|
|
|
|
# but it's not available yet in the current release of Faker (1.9.1).
|
|
|
|
Faker::Verb.unique
|
2020-09-30 09:07:01 +00:00
|
|
|
.instance_variable_get(:@previous_results)[[:base, []]]
|
2019-02-10 12:24:22 +00:00
|
|
|
.merge(TypeLookup.pluck(:name))
|
|
|
|
|
2019-02-11 07:46:26 +00:00
|
|
|
Faker::Verb.unique.past_participle
|
2019-02-10 12:24:22 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|