From 75c92807cf7ab2a845a3b6e549522399ef2c5725 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Tue, 16 Dec 2025 14:39:46 +0530 Subject: [PATCH] test: update processor service specs for liquid templates - Update system instruction expectations to match new liquid template format - Fix event names: make_friendly -> friendly, remove make_formal - All specs now pass with the refactored liquid-based implementation --- .../integrations/openai/processor_service_spec.rb | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/spec/lib/integrations/openai/processor_service_spec.rb b/spec/lib/integrations/openai/processor_service_spec.rb index f9bd5531f..cf1860c72 100644 --- a/spec/lib/integrations/openai/processor_service_spec.rb +++ b/spec/lib/integrations/openai/processor_service_spec.rb @@ -53,13 +53,8 @@ RSpec.describe Integrations::Openai::ProcessorService do it 'sets system instructions' do service.perform - if event_name == 'fix_spelling_grammar' - expect(mock_chat).to have_received(:with_instructions) - .with(a_string_including('Please fix the spelling and grammar')) - else - expect(mock_chat).to have_received(:with_instructions) - .with(a_string_including('You are an AI writing assistant integrated into Chatwoot')) - end + expect(mock_chat).to have_received(:with_instructions) + .with(a_string_including('You are an AI writing assistant integrated into Chatwoot')) end end @@ -67,8 +62,7 @@ RSpec.describe Integrations::Openai::ProcessorService do it_behaves_like 'text transformation operation', 'fix_spelling_grammar' it_behaves_like 'text transformation operation', 'casual' it_behaves_like 'text transformation operation', 'professional' - it_behaves_like 'text transformation operation', 'make_friendly' - it_behaves_like 'text transformation operation', 'make_formal' + it_behaves_like 'text transformation operation', 'friendly' it_behaves_like 'text transformation operation', 'straightforward' end