From e84875ca04bf8bc202118970844cd5980068fd0a Mon Sep 17 00:00:00 2001 From: gabrieljablonski Date: Sun, 1 Feb 2026 14:48:59 -0300 Subject: [PATCH] test: update outgoing message spec to reflect nil sender from WhatsApp --- .../whatsapp/zapi_handlers/received_callback_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/services/whatsapp/zapi_handlers/received_callback_spec.rb b/spec/services/whatsapp/zapi_handlers/received_callback_spec.rb index 41643cff5..4bd7b1ed5 100644 --- a/spec/services/whatsapp/zapi_handlers/received_callback_spec.rb +++ b/spec/services/whatsapp/zapi_handlers/received_callback_spec.rb @@ -1333,12 +1333,13 @@ describe Whatsapp::ZapiHandlers::ReceivedCallback do create(:account_user, account: inbox.account) end - it 'creates outgoing message' do + it 'creates outgoing message with nil sender (sent from WhatsApp)' do service.perform message = Message.last expect(message.message_type).to eq('outgoing') - expect(message.sender_type).to eq('User') + expect(message.sender).to be_nil + expect(message.content_attributes['external_sender_name']).to eq('WhatsApp') end it 'creates contact attachment for outgoing message' do