external_sync.rb 372 B

1234567891011121314
  1. FactoryBot.define do
  2. factory :external_sync do
  3. source { 'Some3rdPartyService' }
  4. source_id { SecureRandom.uuid }
  5. object { 'Ticket' }
  6. o_id { 1 }
  7. # https://github.com/thoughtbot/factory_bot/issues/1142
  8. after :build do |record, options|
  9. record.source_id = options.source_id
  10. record.source = options.source
  11. end
  12. end
  13. end