Fix: Incoming Message Baileys Service Specs (#59)
* fix: update contact creation in messages.update event spec and remove redundant content update test * test: fix spec --------- Co-authored-by: gabrieljablonski <contact@gabrieljablonski.com>
This commit is contained in:
parent
9269a5e165
commit
8ec086f8d0
@ -580,9 +580,10 @@ describe Whatsapp::IncomingMessageBaileysService do
|
|||||||
|
|
||||||
context 'when processing messages.update event' do
|
context 'when processing messages.update event' do
|
||||||
let(:conversation) do
|
let(:conversation) do
|
||||||
|
agent = create(:user, account: inbox.account, role: :agent)
|
||||||
contact = create(:contact, account: inbox.account)
|
contact = create(:contact, account: inbox.account)
|
||||||
contact_inbox = create(:contact_inbox, inbox: inbox, contact: contact)
|
contact_inbox = create(:contact_inbox, inbox: inbox, contact: contact)
|
||||||
create(:conversation, inbox: inbox, contact_inbox: contact_inbox, assignee_id: contact.id)
|
create(:conversation, inbox: inbox, contact_inbox: contact_inbox, assignee_id: agent.id)
|
||||||
end
|
end
|
||||||
let!(:message) { create(:message, inbox: inbox, conversation: conversation, source_id: 'msg_123', status: 'sent') }
|
let!(:message) { create(:message, inbox: inbox, conversation: conversation, source_id: 'msg_123', status: 'sent') }
|
||||||
let(:update_payload) { { key: { id: 'msg_123' }, update: { status: 3 } } }
|
let(:update_payload) { { key: { id: 'msg_123' }, update: { status: 3 } } }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user