Sha256: 9ba8fbe57b8b2b012223d6326791d65e18e9b9adf733f0096d9f9d2b0f2ddb5f

Contents?: true

Size: 1.83 KB

Versions: 24

Compression:

Stored size: 1.83 KB

Contents

require File.join(File.dirname(__FILE__), '../../spec_helper')

describe FbGraph::Connections::Tagged, '#tagged' do
  context 'when included by FbGraph::User' do
    before do
      fake_json(:get, 'arjun/tagged', 'users/tagged/arjun_public')
      fake_json(:get, 'arjun/tagged?access_token=access_token', 'users/tagged/arjun_private')
    end

    context 'when no access_token given' do
      it 'should return posts the user has been tagged as FbGraph::Post' do
        posts = FbGraph::User.new('arjun').tagged
        posts.first.should == FbGraph::Post.new(
          '7901103_117809521578252',
          :from => {
            :id => '1404401889',
            :name => 'Elli Mooney'
          },
          :to => {
            :data => [{
              :id => '7901103',
              :name => 'Arjun Banker'
            }]
          },
          :message => '...uh oh, here comes a privacy issue....',
          :picture => 'http://external.ak.fbcdn.net/safe_image.php?d=c659c86d415c60c37b2871bfd67f2a97&w=130&h=130&url=http%3A%2F%2Fcdn.venturebeat.com%2Fwp-content%2Fuploads%2F2010%2F04%2Fusethisone.jpg',
          :link => 'http://venturebeat.com/2010/04/23/blippy-credit-card-citibank/',
          :name => 'Blippy users’ credit card numbers found on Google | VentureBeat',
          :caption => 'venturebeat.com',
          :description => '[Update: Blippy cofounder Philip Kaplan emailed a response. CNET News is reporting that the cards in question were issued by ...',
          :icon => 'http://static.ak.fbcdn.net/rsrc.php/zB010/hash/9yvl71tw.gif',
          :created_time => '2010-04-24T08:07:59+0000',
          :updated_time => '2010-04-24T08:07:59+0000',
          :privacy => {
            :value => 'EVERYONE'
          }
        )
        posts.each do |post|
          post.should be_instance_of(FbGraph::Post)
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
fb_graph-1.7.0 spec/fb_graph/connections/tagged_spec.rb
fb_graph-1.7.0.alpha2 spec/fb_graph/connections/tagged_spec.rb
fb_graph-1.6.9 spec/fb_graph/connections/tagged_spec.rb
fb_graph-1.7.0.alpha spec/fb_graph/connections/tagged_spec.rb
fb_graph-1.6.8 spec/fb_graph/connections/tagged_spec.rb
fb_graph-1.6.7 spec/fb_graph/connections/tagged_spec.rb
fb_graph-1.6.5 spec/fb_graph/connections/tagged_spec.rb
fb_graph-1.6.4 spec/fb_graph/connections/tagged_spec.rb
fb_graph-1.6.3 spec/fb_graph/connections/tagged_spec.rb
fb_graph-1.6.2 spec/fb_graph/connections/tagged_spec.rb
fb_graph-1.6.1 spec/fb_graph/connections/tagged_spec.rb
fb_graph-1.6.0 spec/fb_graph/connections/tagged_spec.rb
fb_graph-1.5.5 spec/fb_graph/connections/tagged_spec.rb
fb_graph-1.5.4 spec/fb_graph/connections/tagged_spec.rb
fb_graph-1.5.3 spec/fb_graph/connections/tagged_spec.rb
fb_graph-1.5.2 spec/fb_graph/connections/tagged_spec.rb
fb_graph-1.5.1 spec/fb_graph/connections/tagged_spec.rb
fb_graph-1.5.0 spec/fb_graph/connections/tagged_spec.rb
fb_graph-1.4.1 spec/fb_graph/connections/tagged_spec.rb
fb_graph-1.4.0 spec/fb_graph/connections/tagged_spec.rb