From f245f4b2a4c513e4e70dfc91945b8ad945af1fd6 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 5 Nov 2025 17:25:51 +0530 Subject: [PATCH] test: add negative test case for allow_bots disabled --- spec/models/conversation_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/models/conversation_spec.rb b/spec/models/conversation_spec.rb index f202a56d0..6920098c4 100644 --- a/spec/models/conversation_spec.rb +++ b/spec/models/conversation_spec.rb @@ -591,6 +591,13 @@ RSpec.describe Conversation do conversation = create(:conversation, inbox: regular_inbox, campaign: create(:campaign, allow_bots: true)) expect(conversation.status).to eq('open') end + + it 'does not start as pending when allow_bots is explicitly disabled even with bot inbox' do + campaign = create(:campaign, allow_bots: false) + conversation = create(:conversation, inbox: bot_inbox.inbox, campaign: campaign) + expect(conversation.status).to eq('open') + expect(conversation.status).not_to eq('pending') + end end describe '#botintegration: when conversation created in inbox with dialogflow integration' do