Sha256: 32c45902c0b69ee7ab2fcf66ea58f0318bdaea8ded3f50ee45e8cb1ddd69d134

Contents?: true

Size: 876 Bytes

Versions: 50

Compression:

Stored size: 876 Bytes

Contents

Shindo.tests('Fog::Compute[:brightbox] | zone requests', ['brightbox']) do

  tests('success') do

    tests("#list_zones") do
      pending if Fog.mocking?
      result = Fog::Compute[:brightbox].list_zones
      @zone_id = result.first["id"]
      formats(Brightbox::Compute::Formats::Collection::ZONES, false) { result }
    end

    tests("#get_zone('#{@zone_id}')") do
      pending if Fog.mocking?
      result = Fog::Compute[:brightbox].get_zone(@zone_id)
      formats(Brightbox::Compute::Formats::Full::ZONE, false) { result }
    end

  end

  tests('failure') do

    tests("#get_zone('zon-00000')").raises(Excon::Errors::NotFound) do
      pending if Fog.mocking?
      Fog::Compute[:brightbox].get_zone('zon-00000')
    end

    tests("#get_zone").raises(ArgumentError) do
      pending if Fog.mocking?
      Fog::Compute[:brightbox].get_zone
    end

  end

end

Version data entries

50 entries across 50 versions & 15 rubygems

Version Path
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/tests/brightbox/requests/compute/zone_tests.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/zone_tests.rb
fog-1.3.1 tests/brightbox/requests/compute/zone_tests.rb
fog-1.3.0 tests/brightbox/requests/compute/zone_tests.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/zone_tests.rb
fog-1.2.0 tests/brightbox/requests/compute/zone_tests.rb
ktheory-fog-1.1.2 tests/brightbox/requests/compute/zone_tests.rb
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/zone_tests.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/zone_tests.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/zone_tests.rb