Sha256: 69221170c26d8ed978b0c638a8a577b85f6a618501b0ad5e4f29e601ebd53cd1
Contents?: true
Size: 793 Bytes
Versions: 14
Compression:
Stored size: 793 Bytes
Contents
require File.expand_path '../../test_helper', __dir__ # Test class for Delete Vault Request class TestDeleteVault < Minitest::Test def setup @service = Fog::KeyVault::AzureRM.new(credentials) key_vault_client = @service.instance_variable_get(:@key_vault_client) @vaults = key_vault_client.vaults end def test_delete_vault_success @vaults.stub :delete, true do assert @service.delete_vault('fog-test-rg', 'fog-test-kv'), true end end def test_delete_vault_failure response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) } @vaults.stub :delete, response do assert_raises(MsRestAzure::AzureOperationError) { @service.delete_vault('fog-test-rg', 'fog-test-kv') } end end end
Version data entries
14 entries across 14 versions & 2 rubygems