Sha256: 37cb193fcb46a65dfeeac09e2aaf8fd566aa9fc777c56a5a4e519c2cf2012748
Contents?: true
Size: 992 Bytes
Versions: 2
Compression:
Stored size: 992 Bytes
Contents
require "integration/test_helper" describe "Get Blobs" do before do @container = Azure::Blobs.create_container(ContainerNameHelper.name) end after do ContainerNameHelper.clean end it "should get a blob" do create_block_blob(:filename => Fixtures["32px-fulls-black.jpg"].to_path) blob = Azure::Blobs.get_blob(@container, "myblob") blob.must_be :kind_of?, Azure::Blobs::Blob file_content = Base64.strict_encode64(Fixtures["32px-fulls-black.jpg"].read) Base64.strict_encode64(blob.content).must_equal file_content end it "should fetch blob properties" do blob = create_block_blob(:name => "myblob") blob = Azure::Blobs.get_blob(@container, "myblob") blob.properties["etag"].wont_be_nil blob.properties["content-length"].wont_be_nil blob.properties["content-type"].wont_be_nil blob.properties["last-modified"].wont_be_nil blob.properties["etag"].wont_be_nil blob.properties["x-ms-lease-status"].wont_be_nil end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
azure-0.1.1 | test/integration/blobs/get_blobs_test.rb |
azure-0.1.0 | test/integration/blobs/get_blobs_test.rb |