Sha256: 5d5e111e70e5e5256ca583f8d04be40ee348dec16e4a61a4ce16dac6e264bcf7
Contents?: true
Size: 1.79 KB
Versions: 4
Compression:
Stored size: 1.79 KB
Contents
require File.dirname(__FILE__) + '/../../spec_helper' require 'ruby-fs-stack/familytree' describe Org::Familysearch::Ws::Familytree::V2::Schema::Note do describe "build" do before(:each) do @note = Org::Familysearch::Ws::Familytree::V2::Schema::Note.new end it "should receive a hash of options" do @note.build :personId => 'KWQS-BBQ', :assertionId => '10002', :text => "This is my note." end it "should build out the note according to the options" do @note.build :personId => 'KWQS-BBQ', :assertionId => '10002', :text => "This is my note." @note.person.id.should == 'KWQS-BBQ' @note.assertion.id.should == '10002' @note.text.should == "This is my note." end describe "building a spouses note" do before(:each) do @options = {:spouseIds => ['KWQS-BBQ','KWQS-BBR'],:assertionId => '10002', :text => 'MYNOTE.'} end it "should build the note with spouse references, assertion ID and text" do @note.build @options @note.spouses.size.should == 2 @note.spouses[0].id.should == 'KWQS-BBQ' @note.spouses[1].id.should == 'KWQS-BBR' @note.assertion.id.should == '10002' @note.text = 'MYNOTE.' end end describe "building a parent-child note" do before(:each) do @options = {:parentIds => ['KWQS-BBQ'], :childId => 'KWQS-BBZ', :assertionId => '10002', :text => 'MYNOTE.'} end it "should build the note with spouse references, assertion ID and text" do @note.build @options @note.parents.size.should == 1 @note.parents[0].id.should == 'KWQS-BBQ' @note.child.id.should == 'KWQS-BBZ' @note.assertion.id.should == '10002' @note.text = 'MYNOTE.' end end end end
Version data entries
4 entries across 4 versions & 1 rubygems