Sha256: edc2dfec6562a1e73c5c357a2f36234eb19b330efd4d7a26e6b856db9fb786f7

Contents?: true

Size: 545 Bytes

Versions: 8

Compression:

Stored size: 545 Bytes

Contents

Shindo.tests('Slicehost::Compute | image requests', ['slicehost']) do

  @image_format = {
    'id'    => Integer,
    'name'  => String
  }

  tests('success') do

    tests('#get_image(19)').formats(@image_format) do
      Slicehost[:compute].get_image(19).body
    end

    tests('#get_images').formats({ 'images' => [@image_format] }) do
      Slicehost[:compute].get_images.body
    end

  end

  tests('failure') do

    tests('#get_image(0)').raises(Excon::Errors::Forbidden) do
      Slicehost[:compute].get_image(0)
    end

  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fog-0.3.7 tests/slicehost/requests/compute/image_tests.rb
fog-0.3.6 tests/slicehost/requests/compute/image_tests.rb
fog-0.3.5 tests/slicehost/requests/compute/image_tests.rb
fog-0.3.4 tests/slicehost/requests/compute/image_tests.rb
fog-0.3.3 tests/slicehost/requests/compute/image_tests.rb
fog-0.3.2 tests/slicehost/requests/compute/image_tests.rb
fog-0.3.1 tests/slicehost/requests/compute/image_tests.rb
fog-0.3.0 tests/slicehost/requests/compute/image_tests.rb