Chatwoot/spec/factories/bot_message/bot_message_card.rb
Sojan Jose b0950d6880
Feature: Rich Message Types (#610)
Co-authored-by: Pranav Raj S <pranavrajs@gmail.com>
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2020-04-10 16:42:37 +05:30

22 lines
482 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://via.placeholder.com/250x250.png' }
actions do
[{
text: 'Select',
type: 'postback',
payload: 'TACOS'
}, {
text: 'More info',
type: 'link',
uri: 'http://example.org'
}]
end
initialize_with { attributes }
end
end