File: test_check_container_exists.rb

package info (click to toggle)
ruby-gitlab-fog-azure-rm 1.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 756 kB
  • sloc: ruby: 5,926; sh: 9; makefile: 4
file content (18 lines) | stat: -rw-r--r-- 633 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require File.expand_path '../../test_helper', __dir__

# Storage Container Class
class TestCheckContainerExists < Minitest::Test
  # This class posesses the test cases for the requests of checking container exists.
  def setup
    @service = Fog::AzureRM::Storage.new(storage_account_credentials)
    @blob_client = @service.instance_variable_get(:@blob_client)

    @container = ApiStub::Requests::Storage::Directory.container
  end

  def test_check_container_exists_success
    @blob_client.stub :get_container_properties, @container do
      assert_equal @service.check_container_exists('test_container'), true
    end
  end
end