Skip to content

Commit

Permalink
Full code coverage (#35)
Browse files Browse the repository at this point in the history
Test the missing method
  • Loading branch information
tagliala authored Jan 20, 2025
1 parent d6766c5 commit 6d1d8cc
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .rubocop_todo.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions spec/lib/colore/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,25 @@
expect(rsp['path']).to eq "/document/#{app}/#{doc_id}/#{Colore::CURRENT}/#{filename.basename}"
end
end

context 'when content responds to read' do
it 'runs' do
doc_id = 'test_doc_3'
rsp = client.create_document(
doc_id: doc_id,
filename: filename,
content: filename,
title: 'Sample document',
author: 'spliffy',
actions: ['ocr'],
callback_url: nil
)
expect(rsp).not_to be_nil
expect(rsp['status']).to eq 201
expect(rsp['description']).not_to be_empty
expect(rsp['path']).to eq "/document/#{app}/#{doc_id}/#{Colore::CURRENT}/#{filename.basename}"
end
end
end

describe '#update_document', :vcr do
Expand Down

0 comments on commit 6d1d8cc

Please sign in to comment.