Sha256: d2743aa4f821845664ff725fedc9c3c4eb61ad3b7ee0466aea66aace551c46e0

Contents?: true

Size: 628 Bytes

Versions: 11

Compression:

Stored size: 628 Bytes

Contents

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

describe 'EC2.release_address' do
  describe 'success' do

    before(:each) do
      @public_ip = ec2.allocate_address.body['publicIp']
    end

    it "should return proper attributes" do
      actual = ec2.release_address(@public_ip)
      actual.body['requestId'].should be_a(String)
      actual.body['return'].should == true
    end

  end
  describe 'failure' do

    it "should raise a BadRequest error if address does not exist" do
      lambda {
        ec2.release_address('127.0.0.1')
      }.should raise_error(Excon::Errors::BadRequest)
    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
fog-0.0.40 spec/aws/requests/ec2/release_address_spec.rb
fog-0.0.39 spec/aws/requests/ec2/release_address_spec.rb
fog-0.0.38 spec/aws/requests/ec2/release_address_spec.rb
fog-0.0.37 spec/aws/requests/ec2/release_address_spec.rb
fog-0.0.36 spec/aws/requests/ec2/release_address_spec.rb
fog-0.0.35 spec/aws/requests/ec2/release_address_spec.rb
fog-0.0.34 spec/aws/requests/ec2/release_address_spec.rb
fog-0.0.33 spec/aws/requests/ec2/release_address_spec.rb
fog-0.0.32 spec/aws/requests/ec2/release_address_spec.rb
fog-0.0.31 spec/aws/requests/ec2/release_address_spec.rb
fog-0.0.30 spec/aws/requests/ec2/release_address_spec.rb