feat: Add support for template variables in messages content (#6215)

Fixes: #6078

Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
Muhsin Keloth
2023-01-10 16:00:34 +05:30
committed by GitHub
parent e7a52c3a46
commit 078ff615ee
8 changed files with 177 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
# frozen_string_literal: true
require 'rails_helper'
require Rails.root.join 'spec/models/concerns/liquidable_shared.rb'
RSpec.describe Message, type: :model do
context 'with validations' do
@@ -9,6 +10,10 @@ RSpec.describe Message, type: :model do
it { is_expected.to validate_presence_of(:account_id) }
end
describe 'concerns' do
it_behaves_like 'liqudable'
end
describe '#reopen_conversation' do
let(:conversation) { create(:conversation) }
let(:message) { build(:message, message_type: :incoming, conversation: conversation) }