Sha256: bfdbd8d1ea6475d4a45107df23a222ccfa8b192f0d5a36c80c268921b24e3f40

Contents?: true

Size: 887 Bytes

Versions: 33

Compression:

Stored size: 887 Bytes

Contents

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

# Test class for Delete Record Set Request
class TestDeleteRecordSet < Minitest::Test
  def setup
    @service = Fog::DNS::AzureRM.new(credentials)
    @dns_client = @service.instance_variable_get(:@dns_client)
    @record_sets = @dns_client.record_sets
  end

  def test_delete_record_set_success
    response = true
    @record_sets.stub :delete, response do
      assert @service.delete_record_set('fog-test-rg', 'fog-test-record-set', 'fog-test-zone', ''), response
    end
  end

  def test_delete_record_set_failure
    response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
    @record_sets.stub :delete, response do
      assert_raises(RuntimeError) { @service.delete_record_set('fog-test-rg', 'fog-test-record-set', 'fog-test-zone', '') }
    end
  end
end

Version data entries

33 entries across 33 versions & 4 rubygems

Version Path
fog-azure-rm-0.4.5 test/requests/dns/test_delete_record_set.rb
fog-azure-rm-temp-0.0.5 test/requests/dns/test_delete_record_set.rb
fog-azure-rm-0.4.4 test/requests/dns/test_delete_record_set.rb
fog-azure-rm-0.4.3 test/requests/dns/test_delete_record_set.rb
far-gem-0.5.1 test/requests/dns/test_delete_record_set.rb
fog-azure-rm-0.4.2 test/requests/dns/test_delete_record_set.rb
fog-azure-rm-0.4.1 test/requests/dns/test_delete_record_set.rb
fog-azure-rm-0.4.0 test/requests/dns/test_delete_record_set.rb
fog-azure-rm-0.3.9 test/requests/dns/test_delete_record_set.rb
fog-azure-rm-0.3.8 test/requests/dns/test_delete_record_set.rb
fog-azure-rm-0.3.7 test/requests/dns/test_delete_record_set.rb
fog-azure-rm-0.3.6 test/requests/dns/test_delete_record_set.rb
fog-azure-rm-0.3.5 test/requests/dns/test_delete_record_set.rb
fog-azure-rm-0.3.4 test/requests/dns/test_delete_record_set.rb
fog-azure-rm-temp-0.0.4 test/requests/dns/test_delete_record_set.rb
fog-azure-rm-temp-0.0.3 test/requests/dns/test_delete_record_set.rb
fog-azure-rm-0.3.3 test/requests/dns/test_delete_record_set.rb
fog-azure-rm-temp-0.0.2 test/requests/dns/test_delete_record_set.rb
fog-azure-rm-temp-0.0.1 test/requests/dns/test_delete_record_set.rb
fog-azure-rm-0.3.2 test/requests/dns/test_delete_record_set.rb