Sha256: 2f1a1579983e38340cff1bb8b3cd549ca531b0bb9fbb80db3f4f356d9623b89c
Contents?: true
Size: 1012 Bytes
Versions: 2
Compression:
Stored size: 1012 Bytes
Contents
require "integration/test_helper" describe "Listing blobs" do let :container do Azure::Blobs.create_container(ContainerNameHelper.name) end after do ContainerNameHelper.clean end it "returns an empty list if there are no blobs in the container" do blobs = container.blobs blobs.must_be_empty end it "returns a list of blobs if one or more exist" do blob_1 = create_block_blob(container: container, name: "blob_1.jpg") blob_2 = create_block_blob(container: container, name: "blob_2.jpg") blobs = container.blobs blobs.must_include(blob_1) blobs.must_include(blob_2) end it "includes the properties of the blobs" do create_block_blob(:container => container) blob = container.blobs.first blob.properties.wont_be_empty end it "includes any metadata set in the blob" do create_block_blob(:container => container, :metadata => {"Key" => "Value"}) blob = container.blobs.first blob.metadata["Key"].must_equal "Value" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
azure-0.1.1 | test/integration/blobs/list_blobs_test.rb |
azure-0.1.0 | test/integration/blobs/list_blobs_test.rb |