Sha256: 8b6483a5a0374483bf3f40ec5a8ef3e6b03ad694fe99d27ba03bec9c8c25c856

Contents?: true

Size: 1.37 KB

Versions: 43

Compression:

Stored size: 1.37 KB

Contents

describe FbGraph::AdConnectionObject, '.new' do
  it 'should setup all supported attributes' do
    attributes = {
      :id => 354545238888,
      :name => "MyPage",
      :url => "http://www.facebook.com/MyPage",
      :type => 1,
      :tabs =>
      {
        "http://www.facebook.com/MyPage?sk=wall" => "Wall",
        "http://www.facebook.com/MyPage?sk=info" => "Info",
        "http://www.facebook.com/MyPage?sk=friendactivity" => "Friend Activity",
        "http://www.facebook.com/MyPage?sk=photos" => "Photos",
        "http://www.facebook.com/MyPage?sk=app_2373072222" => "Discussions"
      },
      :picture => "http://profile.ak.fbcdn.net/hprofile-ak-snc4/41591_354545238178_3195000_s.jpg"
    }
    ad_connection = FbGraph::AdConnectionObject.new(attributes.delete(:id), attributes)
    ad_connection.identifier.should == 354545238888
    ad_connection.name.should == "MyPage"
    ad_connection.url.should == "http://www.facebook.com/MyPage"
    ad_connection.type.should == 1
    ad_connection.should be_page
    ad_connection.object.should be_instance_of(FbGraph::Page)
    ad_connection.object.identifier.should == 354545238888
    ad_connection.picture.should == "http://profile.ak.fbcdn.net/hprofile-ak-snc4/41591_354545238178_3195000_s.jpg"
    ad_connection.tabs.should be_instance_of(Hash)
    ad_connection.tabs["http://www.facebook.com/MyPage?sk=wall"].should == "Wall"
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
fb_graph-2.5.3 spec/fb_graph/ad_connection_object_spec.rb
fb_graph-2.5.2 spec/fb_graph/ad_connection_object_spec.rb
fb_graph-2.5.1 spec/fb_graph/ad_connection_object_spec.rb
fb_graph-2.5.0 spec/fb_graph/ad_connection_object_spec.rb
fb_graph-2.4.20 spec/fb_graph/ad_connection_object_spec.rb
fb_graph-2.4.19 spec/fb_graph/ad_connection_object_spec.rb
fb_graph-2.4.18 spec/fb_graph/ad_connection_object_spec.rb
fb_graph-2.4.17 spec/fb_graph/ad_connection_object_spec.rb
fb_graph-2.4.16 spec/fb_graph/ad_connection_object_spec.rb
fb_graph-2.4.15 spec/fb_graph/ad_connection_object_spec.rb
fb_graph-2.4.14 spec/fb_graph/ad_connection_object_spec.rb
fb_graph-2.4.13 spec/fb_graph/ad_connection_object_spec.rb
fb_graph-2.4.12 spec/fb_graph/ad_connection_object_spec.rb
fb_graph-2.4.11 spec/fb_graph/ad_connection_object_spec.rb
fb_graph-2.4.10 spec/fb_graph/ad_connection_object_spec.rb
fb_graph-2.4.9 spec/fb_graph/ad_connection_object_spec.rb
fb_graph-2.4.8 spec/fb_graph/ad_connection_object_spec.rb
fb_graph-2.4.7 spec/fb_graph/ad_connection_object_spec.rb
fb_graph-2.4.6 spec/fb_graph/ad_connection_object_spec.rb
fb_graph-2.4.4 spec/fb_graph/ad_connection_object_spec.rb