fix: PDF errors not loading in CI (#13236)

This commit is contained in:
Shivam Mishra
2026-01-12 15:22:15 +05:30
committed by GitHub
parent d526cf283d
commit b099d3a1eb
6 changed files with 23 additions and 31 deletions

View File

@@ -1,5 +1,4 @@
require 'rails_helper'
require 'custom_exceptions/pdf_processing_error'
RSpec.describe Captain::Llm::PaginatedFaqGeneratorService do
let(:document) { create(:captain_document) }
@@ -23,7 +22,7 @@ RSpec.describe Captain::Llm::PaginatedFaqGeneratorService do
end
it 'raises an error' do
expect { service.generate }.to raise_error(CustomExceptions::PdfFaqGenerationError)
expect { service.generate }.to raise_error(CustomExceptions::Pdf::FaqGenerationError)
end
end

View File

@@ -1,5 +1,4 @@
require 'rails_helper'
require 'custom_exceptions/pdf_processing_error'
RSpec.describe Captain::Llm::PdfProcessingService do
let(:document) { create(:captain_document) }
@@ -52,7 +51,7 @@ RSpec.describe Captain::Llm::PdfProcessingService do
it 'raises error when upload fails' do
allow(mock_client.files).to receive(:upload).and_return({ 'id' => nil })
expect { service.process }.to raise_error(CustomExceptions::PdfUploadError)
expect { service.process }.to raise_error(CustomExceptions::Pdf::UploadError)
end
end
end