1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/spec/vcloud/terremark/ecloud/requests/delete_internet_service_spec.rb

37 lines
919 B
Ruby
Raw Normal View History

require File.join(File.dirname(__FILE__), '..', '..', '..', 'spec_helper')
#FIXME: Make this more sane with rspec2
if Fog.mocking?
describe "Fog::Vcloud, initialized w/ the TMRK Ecloud module", :type => :mock_tmrk_ecloud_request do
subject { @vcloud }
it { should respond_to :delete_internet_service }
describe "#delete_internet_service" do
context "with a valid internet service uri" do
2010-06-30 00:15:36 -04:00
subject { @vcloud.delete_internet_service(@mock_service[:href]) }
2010-06-30 00:15:36 -04:00
it_should_behave_like "all delete responses"
2010-06-30 00:15:36 -04:00
let(:public_ip) { @vcloud.vdcs.first.public_ips.first }
it "should change the count by -1" do
public_ip.internet_services.length.should == 2
subject
public_ip.internet_services.reload.length.should == 1
end
2010-06-30 00:15:36 -04:00
describe "#body" do
its(:body) { should == '' }
end
2010-06-30 00:15:36 -04:00
end
end
end
else
end