Sha256: e9a24827494cd16d6a590f46657577832d39841bb93ba00bf581ddf7826e2c18
Contents?: true
Size: 1.26 KB
Versions: 2
Compression:
Stored size: 1.26 KB
Contents
require File.join(File.dirname(__FILE__), '../spec_helper') describe FbGraph::Work, '.new' do it 'should setup all supported attributes' do attributes = { :employer => { :id => 107722015925937, :name => "Drecom Co., Ltd." }, :location => { :id => 111736052177472, :name => "Tokyo, Tokyo" }, :position => { :id => 111091815582753, :name => "Web Engineer" }, :start_date => "2007-04", :end_date => "2008-09" } work = FbGraph::Work.new(attributes) work.employer.should == FbGraph::Page.new( 107722015925937, :name => "Drecom Co., Ltd." ) work.location.should == FbGraph::Page.new( 111736052177472, :name => "Tokyo, Tokyo" ) work.position.should == FbGraph::Page.new( 111091815582753, :name => "Web Engineer" ) work.start_date.should == Date.new(2007, 4) work.end_date.should == Date.new(2008, 9) end it 'should ignore 0000-00 end date' do attributes = { :employer => { :id => 105612642807396, :name => "Cerego Japan Inc." }, :start_date => "2008-10", :end_date => "0000-00" } work = FbGraph::Work.new(attributes) work.end_date.should be_nil end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fb_graph-0.1.1 | spec/fb_graph/work_spec.rb |
fb_graph-0.1.0 | spec/fb_graph/work_spec.rb |