Skip to content

Commit

Permalink
Check returned updated title (#29)
Browse files Browse the repository at this point in the history
Prepare for titles with spaces and slashes and brackets
  • Loading branch information
tagliala authored Jan 20, 2025
1 parent 4b89861 commit 7fe8339
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 7 deletions.
47 changes: 41 additions & 6 deletions spec/fixtures/cassettes/Colore_Client/_update_title/runs.yml

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

5 changes: 4 additions & 1 deletion spec/lib/colore/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,17 @@
describe '#update_title', :vcr do
it 'runs' do
doc_id = 'test_update_title_1'
new_title = 'This is a new title'
client.create_document(
doc_id: doc_id,
filename: filename,
content: File.read(filename)
)
rsp = client.update_title(doc_id: doc_id, title: 'This is a new title')
rsp = client.update_title(doc_id: doc_id, title: new_title)
expect(rsp['status']).to eq 200
expect(rsp['description']).not_to be_empty
rsp = client.get_document_info(doc_id: doc_id)
expect(rsp['title']).to eq new_title
end

it 'fails on an invalid doc_id' do
Expand Down

0 comments on commit 7fe8339

Please sign in to comment.