test: fix incoming message baileys service spec
This commit is contained in:
parent
3d543ea19b
commit
952d69f3c2
@ -617,9 +617,10 @@ describe Whatsapp::IncomingMessageBaileysService do
|
||||
|
||||
context 'when processing messages.update event' do
|
||||
let(:conversation) do
|
||||
contact = create(:contact, account: inbox.account, name: 'John Doe')
|
||||
contact_inbox = create(:contact_inbox, inbox: inbox, contact: contact, source_id: '5511912345678')
|
||||
create(:conversation, inbox: inbox, contact_inbox: contact_inbox, assignee_id: contact.id)
|
||||
agent = create(:user, account: inbox.account, role: :agent)
|
||||
contact = create(:contact, account: inbox.account)
|
||||
contact_inbox = create(:contact_inbox, inbox: inbox, contact: contact)
|
||||
create(:conversation, inbox: inbox, contact_inbox: contact_inbox, assignee_id: agent.id)
|
||||
end
|
||||
let!(:message) { create(:message, inbox: inbox, conversation: conversation, source_id: 'msg_123', status: 'sent') }
|
||||
let(:update_payload) { { key: { id: 'msg_123' }, update: { status: 3 } } }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user