chore: Add sla policy association to conversation (#7360)
Adds the sla policy association to the conversation Fixes: https://linear.app/chatwoot/issue/CW-1615/applying-an-sla-to-the-conversation
This commit is contained in:
7
spec/enterprise/models/conversation_spec.rb
Normal file
7
spec/enterprise/models/conversation_spec.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Conversation, type: :model do
|
||||
describe 'associations' do
|
||||
it { is_expected.to belong_to(:sla_policy).optional }
|
||||
end
|
||||
end
|
||||
@@ -11,6 +11,7 @@ RSpec.describe SlaPolicy, type: :model do
|
||||
|
||||
describe 'associations' do
|
||||
it { is_expected.to belong_to(:account) }
|
||||
it { is_expected.to have_many(:conversations).dependent(:nullify) }
|
||||
end
|
||||
|
||||
describe 'validates_factory' do
|
||||
|
||||
@@ -8,6 +8,11 @@ RSpec.describe Conversation do
|
||||
describe 'associations' do
|
||||
it { is_expected.to belong_to(:account) }
|
||||
it { is_expected.to belong_to(:inbox) }
|
||||
it { is_expected.to belong_to(:contact) }
|
||||
it { is_expected.to belong_to(:contact_inbox) }
|
||||
it { is_expected.to belong_to(:assignee).optional }
|
||||
it { is_expected.to belong_to(:team).optional }
|
||||
it { is_expected.to belong_to(:campaign).optional }
|
||||
end
|
||||
|
||||
describe 'concerns' do
|
||||
|
||||
Reference in New Issue
Block a user