Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check returned updated title #29

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading