Sha256: 994d905a94afdfa30bd88d4bf076e919dc060b02c91a6e744ecb7daee053ac54

Contents?: true

Size: 832 Bytes

Versions: 31

Compression:

Stored size: 832 Bytes

Contents

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

describe 'Rackspace::Servers.list_public_addresses' do
  describe 'success' do

    before(:each) do
      # flavor 1 = 256, image 3 = gentoo 2008.0
      @server_id = Rackspace[:servers].create_server(1, 3, 'name').body['server']['id']
    end

    after(:each) do
      eventually(128) do
        Rackspace[:servers].delete_server(@server_id)
      end
    end

    it "should return proper attributes" do
      actual = Rackspace[:servers].list_public_addresses(@server_id).body
      actual['public'].should be_an(Array)
    end

  end
  describe 'failure' do

    it "should raise a NotFound error if the server does not exist" do
      lambda {
        Rackspace[:servers].list_public_addresses(0)
      }.should raise_error(Excon::Errors::NotFound)
    end

  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
fog-0.0.71 spec/rackspace/requests/servers/list_public_addresses_spec.rb
fog-0.0.70 spec/rackspace/requests/servers/list_public_addresses_spec.rb
fog-0.0.69 spec/rackspace/requests/servers/list_public_addresses_spec.rb
fog-0.0.68 spec/rackspace/requests/servers/list_public_addresses_spec.rb
fog-0.0.67 spec/rackspace/requests/servers/list_public_addresses_spec.rb
fog-0.0.66 spec/rackspace/requests/servers/list_public_addresses_spec.rb
fog-0.0.65 spec/rackspace/requests/servers/list_public_addresses_spec.rb
fog-0.0.64 spec/rackspace/requests/servers/list_public_addresses_spec.rb
fog-0.0.63 spec/rackspace/requests/servers/list_public_addresses_spec.rb
fog-0.0.62 spec/rackspace/requests/servers/list_public_addresses_spec.rb
fog-0.0.61 spec/rackspace/requests/servers/list_public_addresses_spec.rb
fog-0.0.60 spec/rackspace/requests/servers/list_public_addresses_spec.rb
fog-0.0.59 spec/rackspace/requests/servers/list_public_addresses_spec.rb
fog-0.0.58 spec/rackspace/requests/servers/list_public_addresses_spec.rb
fog-0.0.57 spec/rackspace/requests/servers/list_public_addresses_spec.rb
fog-0.0.56 spec/rackspace/requests/servers/list_public_addresses_spec.rb
fog-0.0.55 spec/rackspace/requests/servers/list_public_addresses_spec.rb
fog-0.0.54 spec/rackspace/requests/servers/list_public_addresses_spec.rb
fog-0.0.53 spec/rackspace/requests/servers/list_public_addresses_spec.rb
fog-0.0.52 spec/rackspace/requests/servers/list_public_addresses_spec.rb