Sha256: 52b647050f1078cd720150462d7981868fed1a2522e4f099de82a56b83fc08fe

Contents?: true

Size: 1.48 KB

Versions: 109

Compression:

Stored size: 1.48 KB

Contents

require 'spec_helper'

describe FbGraph::Education, '.new' do

  it 'should setup all supported attributes' do
    attributes = {
      :school => {
        :id => 110149592341159,
        :name => "\u540c\u5fd7\u793e\u5927\u5b66"
      },
      :degree => {
        :id => 110616875633830,
        :name => "Master of Engineering"
      },
      :year => {
        :id => 104926492884272,
        :name => "2007"
      },
      :concentration => [
        {
          :id => 112303688789448,
          :name => "Engineering"
        },
        {
          :id => 102358546472290,
          :name => "Intelligent Information"
        },
        {
          :id => 108311762535367,
          :name => "Intelligent Systems Design Laboratory"
        }
      ]    }
    education = FbGraph::Education.new(attributes)
    education.school.should == FbGraph::Page.new(
      110149592341159,
      :name => "\u540c\u5fd7\u793e\u5927\u5b66"
    )
    education.degree.should == FbGraph::Page.new(
      110616875633830,
      :name => "Master of Engineering"
    )
    education.year.should == FbGraph::Page.new(
      104926492884272,
      :name => "2007"
    )
    education.concentration.should == [
      FbGraph::Page.new(
        112303688789448,
        :name => "Engineering"
      ),
      FbGraph::Page.new(
        102358546472290,
        :name => "Intelligent Information"
      ),
      FbGraph::Page.new(
        108311762535367,
        :name => "Intelligent Systems Design Laboratory"
      )
    ]
  end
end

Version data entries

109 entries across 109 versions & 1 rubygems

Version Path
fb_graph-2.7.17 spec/fb_graph/education_spec.rb
fb_graph-2.7.16 spec/fb_graph/education_spec.rb
fb_graph-2.7.15 spec/fb_graph/education_spec.rb
fb_graph-2.7.14 spec/fb_graph/education_spec.rb
fb_graph-2.7.13 spec/fb_graph/education_spec.rb
fb_graph-2.7.12 spec/fb_graph/education_spec.rb
fb_graph-2.7.11 spec/fb_graph/education_spec.rb
fb_graph-2.7.10 spec/fb_graph/education_spec.rb
fb_graph-2.7.9 spec/fb_graph/education_spec.rb
fb_graph-2.7.8 spec/fb_graph/education_spec.rb
fb_graph-2.7.7 spec/fb_graph/education_spec.rb
fb_graph-2.7.6 spec/fb_graph/education_spec.rb
fb_graph-2.7.5 spec/fb_graph/education_spec.rb
fb_graph-2.7.4 spec/fb_graph/education_spec.rb
fb_graph-2.7.3 spec/fb_graph/education_spec.rb
fb_graph-2.7.2 spec/fb_graph/education_spec.rb
fb_graph-2.7.1 spec/fb_graph/education_spec.rb
fb_graph-2.7.0 spec/fb_graph/education_spec.rb
fb_graph-2.6.7 spec/fb_graph/education_spec.rb
fb_graph-2.6.6 spec/fb_graph/education_spec.rb