From a1d3d6befe41877dfb991b5283d290176b2f39cf Mon Sep 17 00:00:00 2001 From: gabrieljablonski Date: Fri, 25 Apr 2025 17:16:50 -0300 Subject: [PATCH] test: fix spec --- spec/controllers/webhooks/whatsapp_controller_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/controllers/webhooks/whatsapp_controller_spec.rb b/spec/controllers/webhooks/whatsapp_controller_spec.rb index 296461df4..59541dd60 100644 --- a/spec/controllers/webhooks/whatsapp_controller_spec.rb +++ b/spec/controllers/webhooks/whatsapp_controller_spec.rb @@ -81,12 +81,12 @@ RSpec.describe 'Webhooks::WhatsappController', type: :request do expect(response).to have_http_status(:unauthorized) end - it 'returns 400 when MessageNotFoundError is raised' do + it 'returns 404 when MessageNotFoundError is raised' do allow(Webhooks::WhatsappEventsJob).to receive(:perform_now).and_raise(Whatsapp::IncomingMessageBaileysService::MessageNotFoundError) post '/webhooks/whatsapp/123221321', params: { content: 'hello', awaitResponse: true } - expect(response).to have_http_status(:bad_request) + expect(response).to have_http_status(:not_found) end end end