feat: Sort contacts via name, email, phone_number, last_activity_at (#1870)

This commit is contained in:
Pranav Raj S
2021-05-13 13:32:19 +05:30
committed by GitHub
parent 368bab2553
commit 0e6cd699e8
24 changed files with 279 additions and 76 deletions

View File

@@ -17,6 +17,10 @@ RSpec.describe Message, type: :model do
expect(message.created_at).to eq message.conversation.last_activity_at
end
it 'updates contact last_activity_at when created' do
expect { message.save! }.to(change { message.sender.last_activity_at })
end
it 'triggers ::MessageTemplates::HookExecutionService' do
hook_execution_service = double
allow(::MessageTemplates::HookExecutionService).to receive(:new).and_return(hook_execution_service)