2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
2020-07-09 14:43:36 +00:00
|
|
|
FactoryBot.define do
|
|
|
|
factory :external_sync do
|
2020-07-20 06:19:51 +00:00
|
|
|
source { 'Some3rdPartyService' }
|
|
|
|
source_id { SecureRandom.uuid }
|
|
|
|
object { 'Ticket' }
|
|
|
|
o_id { 1 }
|
|
|
|
|
|
|
|
# https://github.com/thoughtbot/factory_bot/issues/1142
|
|
|
|
after :build do |record, options|
|
|
|
|
record.source_id = options.source_id
|
|
|
|
record.source = options.source
|
|
|
|
end
|
2020-07-09 14:43:36 +00:00
|
|
|
end
|
|
|
|
end
|