You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by mf...@redhat.com on 2011/11/22 14:26:03 UTC

[PATCH core 2/3] CIMI: Added test to machine_spec to check if Machine schema hold only Machin attributes (inheritation works ;)

From: Michal Fojtik <mf...@redhat.com>


Signed-off-by: Michal fojtik <mf...@redhat.com>
---
 server/spec/cimi/model/machine_spec.rb |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/server/spec/cimi/model/machine_spec.rb b/server/spec/cimi/model/machine_spec.rb
index d50b078..f1ee296 100644
--- a/server/spec/cimi/model/machine_spec.rb
+++ b/server/spec/cimi/model/machine_spec.rb
@@ -20,6 +20,11 @@ describe "Machine model" do
     @json = IO::read(File::join(DATA_DIR, "machine.json"))
   end
 
+  it "should hold just machine schema" do
+    CIMI::Model::Machine.schema.attribute_names.should_not include(:image_location)
+    CIMI::Model::Machine.schema.attribute_names.should include(:meters)
+  end
+
   it "can be constructed from XML" do
     machine = CIMI::Model::Machine.from_xml(@xml)
     machine.should_not be_nil
-- 
1.7.4.4