This commit is contained in:
aakashb95
2026-01-05 18:14:59 +05:30
parent 2cbc14e366
commit d932156dec
2 changed files with 6 additions and 4 deletions
@@ -251,7 +251,7 @@ RSpec.describe Captain::Conversation::ResponseBuilderJob, type: :job do
closed_all_day: true,
open_all_day: false
)
allow(mock_llm_chat_service).to receive(:generate_response).and_return({ 'response' => 'conversation_handoff' })
allow(mock_llm_chat_service).to receive(:generate_response).and_return({ 'action' => 'handoff' })
end
it 'sends out of office message after handoff' do
@@ -275,7 +275,7 @@ RSpec.describe Captain::Conversation::ResponseBuilderJob, type: :job do
open_all_day: true,
closed_all_day: false
)
allow(mock_llm_chat_service).to receive(:generate_response).and_return({ 'response' => 'conversation_handoff' })
allow(mock_llm_chat_service).to receive(:generate_response).and_return({ 'action' => 'handoff' })
end
it 'does not send out of office message after handoff' do
@@ -321,7 +321,7 @@ RSpec.describe Captain::Conversation::ResponseBuilderJob, type: :job do
closed_all_day: true,
open_all_day: false
)
allow(mock_llm_chat_service).to receive(:generate_response).and_return({ 'response' => 'conversation_handoff' })
allow(mock_llm_chat_service).to receive(:generate_response).and_return({ 'action' => 'handoff' })
end
it 'does not send out of office message' do
@@ -149,7 +149,8 @@ RSpec.describe Captain::Assistant::AgentRunnerService do
expect(result).to eq({
'response' => 'conversation_handoff',
'reasoning' => 'Error occurred: Test error'
'reasoning' => 'Error occurred: Test error',
'action' => 'handoff'
})
end
@@ -170,6 +171,7 @@ RSpec.describe Captain::Assistant::AgentRunnerService do
expect(result).to eq({
'response' => 'conversation_handoff',
'action' => 'handoff',
'reasoning' => 'Error occurred: Test error'
})
end