feat: sla 1 - refactor sla_policies model and add applied_sla model (#8602)

* feat: add models

* chore: refactor sla column names

* chore: remove foreign keys

* chore: fix spec

* chore: refactor models
This commit is contained in:
Vishnu Narayanan
2024-01-23 23:48:02 +05:30
committed by GitHub
parent 4b40c61201
commit 232369cd5c
12 changed files with 114 additions and 18 deletions

View File

@@ -0,0 +1,16 @@
require 'rails_helper'
RSpec.describe AppliedSla, type: :model do
describe 'associations' do
it { is_expected.to belong_to(:sla_policy) }
it { is_expected.to belong_to(:account) }
it { is_expected.to belong_to(:conversation) }
end
describe 'validates_factory' do
it 'creates valid applied sla policy object' do
applied_sla = create(:applied_sla)
expect(applied_sla.sla_status).to eq 'active'
end
end
end