Restructure omni services and add Chatwoot research snapshot
This commit is contained in:
22
research/chatwoot/spec/models/note_spec.rb
Normal file
22
research/chatwoot/spec/models/note_spec.rb
Normal file
@@ -0,0 +1,22 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Note do
|
||||
describe 'validations' do
|
||||
it { is_expected.to validate_presence_of(:content) }
|
||||
it { is_expected.to validate_presence_of(:account_id) }
|
||||
it { is_expected.to validate_presence_of(:contact_id) }
|
||||
end
|
||||
|
||||
describe 'associations' do
|
||||
it { is_expected.to belong_to(:account) }
|
||||
it { is_expected.to belong_to(:user).optional }
|
||||
it { is_expected.to belong_to(:contact) }
|
||||
end
|
||||
|
||||
describe 'validates_factory' do
|
||||
it 'creates valid note object' do
|
||||
note = create(:note)
|
||||
expect(note.content).to eq 'Hey welcome to chatwoot'
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user