Sha256: d4d00e968d21db420d736905ddc216a634a8d41bece5f4e6e21e7efc29a03823

Contents?: true

Size: 923 Bytes

Versions: 3

Compression:

Stored size: 923 Bytes

Contents

require File.expand_path '../../test_helper', __dir__

# Storage Blob Class
class TestDownloadBlob < Minitest::Test
  # This class posesses the test cases for the requests of getting storage blob properties.
  def setup
    @service = Fog::Storage::AzureRM.new(storage_account_credentials)
    @blob_client = @service.instance_variable_get(:@blob_client)
    @storage_blob_object = ApiStub::Requests::Storage::File.download_blob_to_file
  end

  def test_download_blob_with_service_success
    @blob_client.stub :get_blob, @storage_blob_object do
      file_path = 'test.dat'
      assert @service.download_blob_to_file('testcontainer', 'testblob1', file_path)
      File.delete file_path
    end
  end

  def test_download_blob_with_internal_client_success
    @blob_client.stub :get_blob, @storage_blob_object do
      assert @blob_client.get_blob('testcontainer', 'testblob1')
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fog-azure-rm-0.1.0 test/requests/storage/test_download_blob_to_file.rb
fog-azure-rm-0.0.9 test/requests/storage/test_download_blob_to_file.rb
fog-azure-rm-0.0.8 test/requests/storage/test_download_blob_to_file.rb