spec/vcloud/terremark/ecloud/models/internet_service_spec.rb in fog-0.1.8 vs spec/vcloud/terremark/ecloud/models/internet_service_spec.rb in fog-0.1.9

- old
+ new

@@ -36,10 +36,12 @@ end context "as a collection member" do subject { @vcloud.vdcs[0].public_ips[0].internet_services[0] } let(:public_ip) { @vcloud.get_public_ip(@vcloud.vdcs[0].public_ips[0].internet_services[0].public_ip.href).body } + let(:composed_public_ip_data) { @vcloud.vdcs[0].public_ips[0].internet_services[0].send(:_compose_ip_data) } + let(:composed_service_data) { @vcloud.vdcs[0].public_ips[0].internet_services[0].send(:_compose_service_data) } it { should be_an_instance_of Fog::Vcloud::Terremark::Ecloud::InternetService } its(:href) { should == @mock_service_uri } its(:identity) { should == @mock_service_uri } @@ -52,7 +54,20 @@ its(:description) { should == "Web Servers" } its(:public_ip) { should == public_ip } its(:timeout) { should == 2 } its(:url_send_string) { should == nil } its(:http_header) { should == nil } + + specify { composed_public_ip_data[:href].should == public_ip.href.to_s } + specify { composed_public_ip_data[:name].should == public_ip.name } + specify { composed_public_ip_data[:id].should == public_ip.id } + + specify { composed_service_data[:href].should == subject.href.to_s } + specify { composed_service_data[:name].should == subject.name } + specify { composed_service_data[:id].should == subject.id.to_s } + specify { composed_service_data[:protocol].should == subject.protocol } + specify { composed_service_data[:port].should == subject.port.to_s } + specify { composed_service_data[:enabled].should == subject.enabled.to_s } + specify { composed_service_data[:description].should == subject.description } + specify { composed_service_data[:timeout].should == subject.timeout.to_s } end end