test/api_stub/requests/storage/file.rb in fog-azure-rm-0.4.8 vs test/api_stub/requests/storage/file.rb in fog-azure-rm-0.4.9

- old
+ new

@@ -3,9 +3,18 @@ module Storage # Mock class for Deployment Requests # Below data should be as same as those in Mock classes in lib/fog/azurerm/requests/storage/*.rb class File def self.blob + blob_data = blob_as_hash + blob = Azure::Storage::Blob::Blob.new + blob.name = blob_data['name'] + blob.metadata = blob_data['metadata'] + blob.properties = blob_data['properties'].map { |k, v| { k.to_sym => v } }.reduce({}, &:merge!) + blob + end + + def self.blob_as_hash { 'name' => 'test_blob', 'metadata' => {}, 'properties' => { 'last_modified' => 'Mon, 04 Jul 2016 09:30:31 GMT',