trabajo-afectivo/spec/factories/external_sync.rb

15 lines
372 B
Ruby
Raw Normal View History

FactoryBot.define do
factory :external_sync do
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
end
end