test/integration/blob/blob_metadata_test.rb in azure-0.7.0 vs test/integration/blob/blob_metadata_test.rb in azure-0.7.1
- old
+ new
@@ -16,17 +16,17 @@
require "azure/blob/blob_service"
describe Azure::Blob::BlobService do
subject { Azure::Blob::BlobService.new }
after { TableNameHelper.clean }
-
+
describe '#set/get_blob_metadata' do
let(:container_name) { ContainerNameHelper.name }
let(:blob_name) { "blobname" }
let(:length) { 1024 }
let(:metadata){ {"custommetadata" => "CustomMetadataValue"} }
- before {
+ before {
subject.create_container container_name
subject.create_page_blob container_name, blob_name, length
}
it 'sets and gets metadata for a blob' do
@@ -38,11 +38,11 @@
blob.metadata.must_include k
blob.metadata[k].must_equal v
}
end
- describe 'when a blob has a snapshot' do
+ describe 'when a blob has a snapshot' do
let(:snapshot) { subject.create_blob_snapshot container_name, blob_name, {:metadata => metadata }}
before { s = snapshot }
it 'gets metadata for a blob snapshot (when set during create)' do
@@ -51,19 +51,19 @@
blob.snapshot.must_equal snapshot
metadata.each { |k,v|
blob.metadata.must_include k
blob.metadata[k].must_equal v
}
-
+
end
it 'errors if the snapshot does not exist' do
assert_raises(Azure::Core::Http::HTTPError) do
subject.get_blob_metadata container_name, blob_name, { :snapshot => "invalidsnapshot" }
end
end
end
-
+
it 'errors if the blob name does not exist' do
assert_raises(Azure::Core::Http::HTTPError) do
subject.get_blob_metadata container_name, "thisblobdoesnotexist"
end
assert_raises(Azure::Core::Http::HTTPError) do