From ac5aee3c8dc8b1b3a60dfa3ed8174c8f54ce0679 Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Wed, 7 Feb 2024 15:50:08 +0530 Subject: [PATCH] Update incoming_message_whatsapp_cloud_service_spec.rb --- .../incoming_message_whatsapp_cloud_service_spec.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spec/services/whatsapp/incoming_message_whatsapp_cloud_service_spec.rb b/spec/services/whatsapp/incoming_message_whatsapp_cloud_service_spec.rb index b222354a4..eb47d3f7c 100644 --- a/spec/services/whatsapp/incoming_message_whatsapp_cloud_service_spec.rb +++ b/spec/services/whatsapp/incoming_message_whatsapp_cloud_service_spec.rb @@ -48,7 +48,8 @@ describe Whatsapp::IncomingMessageWhatsappCloudService do described_class.new(inbox: whatsapp_channel.inbox, params: params).perform expect(whatsapp_channel.inbox.conversations.count).not_to eq(0) - expect(Contact.all.first.name).to eq('Sojan Jose') + expect(Contact.all.first.name).to eq('Sojan') + expect(Contact.all.first.last_name).to eq('Jose') expect(whatsapp_channel.inbox.messages.first.content).to eq('Check out my product!') expect(whatsapp_channel.inbox.messages.first.attachments.present?).to be true end @@ -60,7 +61,7 @@ describe Whatsapp::IncomingMessageWhatsappCloudService do described_class.new(inbox: whatsapp_channel.inbox, params: params).perform expect(whatsapp_channel.inbox.conversations.count).not_to eq(0) - expect(Contact.all.first.name).to eq('Sojan Jose') + expect(Contact.all.first.name).to eq('Sojan') expect(whatsapp_channel.inbox.messages.first.content).to eq('Check out my product!') expect(whatsapp_channel.inbox.messages.first.attachments.present?).to be false expect(whatsapp_channel.authorization_error_count).to eq(1) @@ -100,7 +101,7 @@ describe Whatsapp::IncomingMessageWhatsappCloudService do it 'with attachment errors' do described_class.new(inbox: whatsapp_channel.inbox, params: error_params).perform expect(whatsapp_channel.inbox.conversations.count).not_to eq(0) - expect(Contact.all.first.name).to eq('Sojan Jose') + expect(Contact.all.first.name).to eq('Sojan') expect(whatsapp_channel.inbox.messages.count).to eq(0) end end