Sha256: 286217996094784541e075de5fc0e5b5f1ede8db586182a060e2fecf089d82da

Contents?: true

Size: 692 Bytes

Versions: 44

Compression:

Stored size: 692 Bytes

Contents

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

  @flavor_format = {
    'id'    => Integer,
    'name'  => String,
    'price' => Integer,
    'ram'   => Integer
  }

  tests('success') do

    tests('#get_flavor(1)').formats(@flavor_format) do
      pending if Fog.mocking?
      Slicehost[:compute].get_flavor(1).body
    end

    tests('#get_flavors').formats({ 'flavors' => [@flavor_format] }) do
      pending if Fog.mocking?
      Slicehost[:compute].get_flavors.body
    end

  end

  tests('failure') do

    tests('#get_flavor(0)').raises(Excon::Errors::Forbidden) do
      pending if Fog.mocking?
      Slicehost[:compute].get_flavor(0)
    end

  end

end

Version data entries

44 entries across 44 versions & 2 rubygems

Version Path
fog-0.8.2 tests/compute/requests/slicehost/flavor_tests.rb
fog-0.8.1 tests/compute/requests/slicehost/flavor_tests.rb
fog-0.8.0 tests/compute/requests/slicehost/flavor_tests.rb
fog-0.7.2 tests/compute/requests/slicehost/flavor_tests.rb
fog-0.7.1 tests/compute/requests/slicehost/flavor_tests.rb
fog-0.7.0 tests/compute/requests/slicehost/flavor_tests.rb
fog-0.6.0 tests/compute/requests/slicehost/flavor_tests.rb
fog-0.5.3 tests/compute/requests/slicehost/flavor_tests.rb
fog-0.5.2 tests/compute/requests/slicehost/flavor_tests.rb
fog-0.5.1 tests/compute/requests/slicehost/flavor_tests.rb
fog-0.5.0 tests/compute/requests/slicehost/flavor_tests.rb
phpfog-fog-0.4.1.3 tests/compute/requests/slicehost/flavor_tests.rb
phpfog-fog-0.4.1.2 tests/compute/requests/slicehost/flavor_tests.rb
phpfog-fog-0.4.1.1 tests/compute/requests/slicehost/flavor_tests.rb
phpfog-fog-0.4.1 tests/compute/requests/slicehost/flavor_tests.rb
fog-0.4.1 tests/compute/requests/slicehost/flavor_tests.rb
fog-0.4.0 tests/compute/requests/slicehost/flavor_tests.rb
fog-0.3.34 tests/slicehost/requests/compute/flavor_tests.rb
fog-0.3.33 tests/slicehost/requests/compute/flavor_tests.rb
fog-0.3.32 tests/slicehost/requests/compute/flavor_tests.rb