Sha256: e45b5c6994f7278fa453a9b9a95308b0bc325e8011757d3b9e442668ebc9359f

Contents?: true

Size: 908 Bytes

Versions: 7

Compression:

Stored size: 908 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper'

describe 'Slicehost.create_slice' do
  describe 'success' do

    after(:each) do
      eventually(128) do
        slicehost.delete_slice(@slice_id)
      end
    end

    it "should return proper attributes" do
      # flavor_id 1: 256 ram, image_id 3: Gentoo 2008.0
      actual = slicehost.create_slice(1, 3, 'fogslice').body      
      actual['addresses'].should be_a(Array)
      # actual['backup-id'].should be_an(Integer)
      actual['bw-in'].should be_an(Float)
      actual['bw-out'].should be_an(Float)
      actual['flavor-id'].should be_an(Integer)
      actual['id'].should be_an(Integer)
      actual['image-id'].should be_an(Integer)
      actual['name'].should be_an(String)
      actual['progress'].should be_an(Integer)
      actual['root-password'].should be_a(String)
      actual['status'].should be_an(String)
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fog-0.0.38 spec/slicehost/requests/create_slice_spec.rb
fog-0.0.37 spec/slicehost/requests/create_slice_spec.rb
fog-0.0.36 spec/slicehost/requests/create_slice_spec.rb
fog-0.0.35 spec/slicehost/requests/create_slice_spec.rb
fog-0.0.34 spec/slicehost/requests/create_slice_spec.rb
fog-0.0.33 spec/slicehost/requests/create_slice_spec.rb
fog-0.0.32 spec/slicehost/requests/create_slice_spec.rb