Chatwoot/spec/factories/bot_message/bot_message_card.rb
Sojan Jose a4c87f2052
chore: Handle attachments in Whatsapp Channel (#3299)
send and receive attachments in 360Dialog WhatsApp channels
2021-11-11 13:03:48 +05:30

22 lines
483 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :bot_message_card, class: Hash do
title { Faker::Book.name }
description { Faker::Movie.quote }
media_url { 'https://chatwoot-assets.local/sample.png' }
actions do
[{
text: 'Select',
type: 'postback',
payload: 'TACOS'
}, {
text: 'More info',
type: 'link',
uri: 'http://example.org'
}]
end
initialize_with { attributes }
end
end