Sha256: df48a03c554eff922f6d198a7e4c8e9f7a69c96c866774a837bb2c496e339eed

Contents?: true

Size: 730 Bytes

Versions: 1

Compression:

Stored size: 730 Bytes

Contents

require 'spec_helper'

describe FbGraph::Connections::Attending, '#attending' do
  before do
    fake_json(:get, 'smartday/attending?access_token=access_token', 'events/attending/smartday_private')
  end

  it 'should return attending users as FbGraph::User' do
    users = FbGraph::Event.new('smartday', :access_token => 'access_token').attending
    users.each do |user|
      user.should be_instance_of(FbGraph::User)
    end
  end
end

describe FbGraph::Connections::Attending, '#attending!' do
  before do
    fake_json(:post, '12345/attending', 'events/attending/post_with_valid_access_token')
  end

  it 'should return true' do
    FbGraph::Event.new('12345', :access_token => 'valid').attending!.should be_true
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fb_graph-1.7.1 spec/fb_graph/connections/attending_spec.rb