spec/vcloud/requests/get_vdc_spec.rb in fog-0.1.4 vs spec/vcloud/requests/get_vdc_spec.rb in fog-0.1.5
- old
+ new
@@ -9,11 +9,11 @@
it { should respond_to :get_vdc }
describe :get_vdc, :type => :vcloud_request do
context "with a valid vdc uri" do
- before { @vdc = @vcloud.get_vdc(@mock_vdc[:href]) }
+ before { @vdc = @vcloud.get_vdc(URI.parse(@mock_vdc[:href])) }
subject { @vdc }
it_should_behave_like "all requests"
its(:headers) { should include "Content-Type" }
@@ -28,16 +28,19 @@
subject { @vdc.body }
it_should_behave_like "it has a vcloud v0.8 xmlns"
its(:links) { should have(7).links }
+ its(:resource_entities) { should have(3).links }
+ its(:networks) { should have(2).networks }
+
its(:name) { should == @mock_vdc[:name] }
- its(:href) { should == @mock_vdc[:href] }
+ its(:href) { should == URI.parse(@mock_vdc[:href]) }
let(:link) { subject.links[0] }
specify { link.should be_an_instance_of Struct::VcloudLink }
specify { link.rel.should == "up" }
- specify { link.href.should == @mock_organization[:info][:href] }
+ specify { link.href.should == URI.parse(@mock_organization[:info][:href]) }
specify { link.type.should == "application/vnd.vmware.vcloud.org+xml" }
end
end
context "with a vdc uri that doesn't exist" do
subject { lambda { @vcloud.get_vdc(URI.parse('https://www.fakey.com/api/v0.8/vdc/999')) } }