Sha256: e7f07359b8ee085a65348f0fb7ca56642937789945ffa2f1f6f959439a9551b7
Contents?: true
Size: 1.08 KB
Versions: 4
Compression:
Stored size: 1.08 KB
Contents
require File.join(File.dirname(__FILE__), '../../spec_helper') describe FbGraph::Connections::Events, '#events' do describe 'when included by FbGraph::User' do before(:all) do fake_json(:get, 'matake/events', 'users/events/matake_public') fake_json(:get, 'matake/events?access_token=access_token', 'users/events/matake_private') end it 'should raise FbGraph::Unauthorized when no access_token given' do lambda do FbGraph::User.new('matake').events end.should raise_exception(FbGraph::Unauthorized) end it 'should return public own posts even when access_token is not given' do events = FbGraph::User.new('matake', :access_token => 'access_token').events events.first.should == FbGraph::Event.new( '116600818359630', :name => 'The Loyal We @ Rainy Day Bookstore and Cafe', :start_time => '2010-04-29T01:30:00+0000', :end_time => '2010-04-29T04:30:00+0000', :location => 'Nishi Azabu' ) events.each do |event| event.should be_instance_of(FbGraph::Event) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems