Sha256: eff554a0086cc1bca1839c088c9a0b2c07060b7ec4b3065958cbcbaeac3352b2

Contents?: true

Size: 807 Bytes

Versions: 8

Compression:

Stored size: 807 Bytes

Contents

Shindo.tests('Bluebox::Compute | template requests', ['bluebox']) do

  @template_format = {
    'created'     => String,
    'description' => String,
    'id'          => String,
    'public'      => Fog::Boolean
  }

  tests('success') do

    @template_id  = 'a00baa8f-b5d0-4815-8238-b471c4c4bf72' # Ubuntu 9.10 64bit

    tests("get_template('#{@template_id}')").formats(@template_format) do
      Bluebox[:compute].get_template(@template_id).body
    end

    tests("get_templates").formats([@template_format]) do
      Bluebox[:compute].get_templates.body
    end

  end

  tests('failure') do

    tests("get_template('00000000-0000-0000-0000-000000000000')").raises(Fog::Bluebox::Compute::NotFound) do
      Bluebox[:compute].get_template('00000000-0000-0000-0000-000000000000')
    end

  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

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