Sha256: d1e2e2a9067ee642c12c7ed63fb64db0640fe1ade14af71be430e33d6b7cdadf

Contents?: true

Size: 1.23 KB

Versions: 3

Compression:

Stored size: 1.23 KB

Contents

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

# Storage Container Class
class TestGetContainerACL < Minitest::Test
  # This class posesses the test cases for the requests of getting storage container properties.
  def setup
    @service = Fog::Storage::AzureRM.new(storage_account_credentials)
    @blob_client = @service.instance_variable_get(:@blob_client)
    @storage_container_object = ApiStub::Requests::Storage::Directory.get_container_access_control_list
  end

  def test_get_container_acl_with_service_success
    @blob_client.stub :get_container_acl, @storage_container_object do
      assert @service.get_container_access_control_list('testcontainer1')
    end
  end

  def test_get_container_acl_with_internal_client_success
    @blob_client.stub :get_container_acl, @storage_container_object do
      assert @blob_client.get_container_acl('testcontainer1')
    end
  end

  def test_get_container_acl_with_service_exception
    assert_raises(URI::InvalidURIError) { @service.get_container_access_control_list('testcontainer1#@#@') }
  end

  def test_get_container_acl_with_internal_client_exception
    assert_raises(URI::InvalidURIError) { @blob_client.get_container_acl('testcontainer1#@#@') }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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