Skip to content
Open
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
7 changes: 5 additions & 2 deletions google-cloud-storage/samples/acceptance/files_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,13 @@ def mock_cipher.random_key
set_object_contexts bucket_name: bucket.name, file_name: remote_file_name, custom_context_key: custom_context_key2, custom_context_value: custom_context_value2
end
it "fetches all object contexts" do

assert_output "Custom Contexts for #{remote_file_name} are:\nKey: #{custom_context_key1}, Value: #{custom_context_value1}\nKey: #{custom_context_key2}, Value: #{custom_context_value2}\n" do
out, _err = capture_io do
get_object_contexts bucket_name: bucket.name, file_name: remote_file_name
end

assert_includes out, "Custom Contexts for #{remote_file_name} are:\n"
assert_includes out, "Key: #{custom_context_key1}, Value: #{custom_context_value1}\n"
assert_includes out, "Key: #{custom_context_key2}, Value: #{custom_context_value2}\n"
end
end

Expand Down
Loading