chore: Automate conversation display_id generation with db triggers (#1412)

Automate conversation display_id generation with db triggers

Co-authored-by: Saurabh Mehta <saurabh1.mehta@airtel.com>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
Saurabh Mehta
2021-01-05 20:07:04 +05:30
committed by GitHub
parent 45059b6fe9
commit 627d3a575a
10 changed files with 102 additions and 18 deletions

View File

@@ -13,6 +13,7 @@ RSpec.describe Message, type: :model do
let(:message) { build(:message, account: create(:account)) }
it 'updates conversation last_activity_at when created' do
message.save!
expect(message.created_at).to eq message.conversation.last_activity_at
end