fix: captain talking over support agent (#13673)

This commit is contained in:
Aakash Bakhle
2026-03-03 16:13:34 +05:30
committed by GitHub
parent 89da4a2292
commit 374d2258c7
7 changed files with 151 additions and 4 deletions

View File

@@ -271,6 +271,15 @@ RSpec.describe Message do
end
end
describe '#mark_pending_conversation_as_open_for_human_response' do
let(:conversation) { create(:conversation, status: :pending) }
it 'does not mark the conversation open when pending is used without captain' do
create(:message, message_type: :outgoing, conversation: conversation)
expect(conversation.reload.pending?).to be true
end
end
describe '#waiting since' do
let(:conversation) { create(:conversation) }
let(:agent) { create(:user, account: conversation.account) }