1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

ensure we can fetch it

This commit is contained in:
Dan Peterson 2010-10-15 14:59:14 -03:00
parent 199a0929b8
commit 549b3abb04

View file

@ -21,6 +21,7 @@ if Fog.mocking?
:vdc_uri => vdc.href
}
end
let(:added_mock_data) { @vcloud.vdc_from_uri(vdc.href)[:vms].last }
context "with a valid data" do
let(:template_instantiation) { @vcloud.instantiate_vapp_template(catalog_item.href, new_vapp_data) }
@ -34,7 +35,7 @@ if Fog.mocking?
end
describe "added mock data" do
subject { template_instantiation; @vcloud.vdc_from_uri(vdc.href)[:vms].last }
subject { template_instantiation; added_mock_data }
it { should include :id }
it { should include :href }
@ -46,6 +47,12 @@ if Fog.mocking?
specify { subject.values_at(*new_vapp_data.keys).should == new_vapp_data.values }
end
describe "server based on added mock data" do
subject { template_instantiation; vdc.servers.reload.detect {|s| s.href == added_mock_data[:href] }.reload }
its(:name) { should == new_vapp_data[:name] }
end
describe "#body" do
subject { template_instantiation.body }