Sha256: d7ecb9e1864bd66ed9ae3b711beca211e92c4f850249212631bd02829220bf41

Contents?: true

Size: 590 Bytes

Versions: 36

Compression:

Stored size: 590 Bytes

Contents

Shindo.tests('Slicehost | 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
      Slicehost[:slices].get_flavor(1).body
    end

    tests('#get_flavors').formats({ 'flavors' => [@flavor_format] }) do
      Slicehost[:slices].get_flavors.body
    end

  end

  tests('failure') do

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

  end

end

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
fog-0.2.30 tests/slicehost/requests/flavor_tests.rb
fog-0.2.28 tests/slicehost/requests/flavor_tests.rb
fog-0.2.27 tests/slicehost/requests/flavor_tests.rb
fog-0.2.26 tests/slicehost/requests/flavor_tests.rb
fog-0.2.25 tests/slicehost/requests/flavor_tests.rb
fog-0.2.24 tests/slicehost/requests/flavor_tests.rb
tecnh-fog-0.2.23.vpc tests/slicehost/requests/flavor_tests.rb
fog-0.2.23 tests/slicehost/requests/flavor_tests.rb
fog-0.2.22 tests/slicehost/requests/flavor_tests.rb
fog-0.2.21 tests/slicehost/requests/flavor_tests.rb
fog-0.2.20 tests/slicehost/requests/flavor_tests.rb
fog-0.2.19 tests/slicehost/requests/flavor_tests.rb
fog-0.2.18 tests/slicehost/requests/flavor_tests.rb
fog-0.2.17 tests/slicehost/requests/flavor_tests.rb
fog-0.2.16 tests/slicehost/requests/flavor_tests.rb
fog-0.2.15 tests/slicehost/requests/flavor_tests.rb
fog-0.2.14 tests/slicehost/requests/flavor_tests.rb
fog-0.2.13 tests/slicehost/requests/flavor_tests.rb
fog-0.2.12 tests/slicehost/requests/flavor_tests.rb
fog-0.2.11 tests/slicehost/requests/flavor_tests.rb