Sha256: 1dd5bbd1cfc2390c58aac865c9953e1ad7ffc0ebbd0b5d54db2fc318b8c2a964
Contents?: true
Size: 1.12 KB
Versions: 17
Compression:
Stored size: 1.12 KB
Contents
require File.expand_path("../../spec_helper", __FILE__) module Rews describe Shape do describe Shape::FolderShape do it "should write FolderShape xml" do xml = Shape::FolderShape.new(:base_shape=>:IdOnly, :additional_properties=>[[:field_uri, "folder:FolderId"], [:field_uri, "folder:TotalCount"]]).to_xml doc = Nokogiri::XML(xml) fs = doc.children.first fs.name.should == "FolderShape" fs.children.size.should == 2 bs = fs.children.first bs.name.should == "BaseShape" bs.content.should == "IdOnly" ap = fs.children[1] ap.name.should == "AdditionalProperties" ap.children.size.should == 2 fid = ap.children.first fid.name.should == "FieldURI" fid[:FieldURI].should == "folder:FolderId" fid.children.size.should == 0 ftot = ap.children[1] ftot.name.should == "FieldURI" ftot[:FieldURI].should == "folder:TotalCount" ftot.children.size.should == 0 end end end end
Version data entries
17 entries across 17 versions & 1 rubygems