Sha256: 87979be82f4390d9db3bcc4a61ce4a6f16c276e56a28ffe2f75f40ab225a38f4

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 TestGetContaienrACL < 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::Container.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.0.6 test/requests/storage/test_get_container_access_control_list.rb
fog-azure-rm-0.0.5 test/requests/storage/test_get_container_access_control_list.rb
fog-azure-rm-0.0.4 test/requests/storage/test_get_container_access_control_list.rb