Sha256: d4b0b321d6ae0549b40583a7ae733460d15269963372deb4c3a4cf56d6353cad

Contents?: true

Size: 852 Bytes

Versions: 48

Compression:

Stored size: 852 Bytes

Contents

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

# Storage Data Disk Class
class TestDeleteDisk < Minitest::Test
  # This class posesses the test cases for the requests of deleting data disks.
  def setup
    Fog.mock!
    @mock_service = Fog::Storage::AzureRM.new(storage_account_credentials)
    Fog.unmock!
    @mocked_response = mocked_storage_http_error

    @service = Fog::Storage::AzureRM.new(storage_account_credentials)
  end

  def test_delete_disk_success
    @service.stub :delete_blob, true do
      assert @service.delete_disk('test_disk')
    end
  end

  def test_delete_disk_in_another_container_success
    @service.stub :delete_blob, true do
      assert @service.delete_disk('test_disk', container_name: 'test_container')
    end
  end

  def test_delete_disk_mock
    assert @mock_service.delete_disk('test_disk')
  end
end

Version data entries

48 entries across 48 versions & 5 rubygems

Version Path
fog-azure-rm-0.6.0 test/requests/storage/test_delete_disk.rb
gitlab-fog-azure-rm-0.6.0 test/requests/storage/test_delete_disk.rb
fog-azure-rm-0.5.3 test/requests/storage/test_delete_disk.rb
fog-azure-rm-0.5.2 test/requests/storage/test_delete_disk.rb
far-gem-0.5.6 test/requests/storage/test_delete_disk.rb
fog-azure-rm-0.5.1 test/requests/storage/test_delete_disk.rb
far-gem-0.5.5 test/requests/storage/test_delete_disk.rb
fog-azure-rm-0.5.0 test/requests/storage/test_delete_disk.rb
far-gem-0.5.4 test/requests/storage/test_delete_disk.rb
far-gem-0.5.3 test/requests/storage/test_delete_disk.rb
fog-azure-rm-0.4.9 test/requests/storage/test_delete_disk.rb
far-gem-0.5.2 test/requests/storage/test_delete_disk.rb
fog-azure-rm-0.4.8 test/requests/storage/test_delete_disk.rb
fog-azure-rm-0.4.7 test/requests/storage/test_delete_disk.rb
fog-azure-rm-0.4.6 test/requests/storage/test_delete_disk.rb
fog-azure-rm-0.4.5 test/requests/storage/test_delete_disk.rb
fog-azure-rm-temp-0.0.5 test/requests/storage/test_delete_disk.rb
fog-azure-rm-0.4.4 test/requests/storage/test_delete_disk.rb
fog-azure-rm-0.4.3 test/requests/storage/test_delete_disk.rb
far-gem-0.5.1 test/requests/storage/test_delete_disk.rb