state.rb 533 B

1234567891011121314151617
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. FactoryBot.define do
  3. factory :'ticket/state', aliases: %i[ticket_state] do
  4. name do
  5. # The following line ensures that the name generated by Faker
  6. # does not conflict with any existing names in the DB.
  7. Faker::Verb.unique.exclude(:past_participle, [], Ticket::State.pluck(:name))
  8. Faker::Verb.unique.past_participle
  9. end
  10. state_type factory: %i[ticket/state_type]
  11. updated_by_id { 1 }
  12. created_by_id { 1 }
  13. end
  14. end