Sha256: 450186f7521cf3b0b79d945890acb45abf624b89082e9003a3cd68d367a154d9
Contents?: true
Size: 1.12 KB
Versions: 14
Compression:
Stored size: 1.12 KB
Contents
require File.expand_path '../../test_helper', __dir__ # Test Class for Get Storage Account Request class TestGetStorageAccount < Minitest::Test # This class posesses the test cases for the requests of storage account service. def setup @service = Fog::Storage::AzureRM.new(credentials) @storage_mgmt_client = @service.instance_variable_get(:@storage_mgmt_client) @storage_accounts = @storage_mgmt_client.storage_accounts end def test_get_storage_account_success response_body = ApiStub::Requests::Storage::StorageAccount.storage_account_request(@storage_mgmt_client) @storage_accounts.stub :get_properties, response_body do assert_equal @service.get_storage_account('fog_test_rg', 'fogtestsasecond'), response_body end end def test_list_storage_accounts_exeception raise_exception = proc { fail MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) } @storage_accounts.stub :get_properties, raise_exception do assert_raises(MsRestAzure::AzureOperationError) { @service.get_storage_account('fog_test_rg', 'fogtestsasecond') } end end end
Version data entries
14 entries across 14 versions & 2 rubygems