Sha256: d1037a1723d7b1626dfb3a567d5bc6430295c6c6ddf0c253eab9cbe45a8b0643
Contents?: true
Size: 1.13 KB
Versions: 4
Compression:
Stored size: 1.13 KB
Contents
require File.join(File.dirname(__FILE__), '../../spec_helper') context 'when included by FbGraph::User' do describe FbGraph::Connections::Activities, '#activities' do before(:all) do fake_json(:get, 'arjun/activities', 'users/activities/arjun_public') fake_json(:get, 'arjun/activities?access_token=access_token', 'users/activities/arjun_private') end context 'when no access_token given' do it 'should raise FbGraph::Unauthorized' do lambda do FbGraph::User.new('arjun').activities end.should raise_exception(FbGraph::Unauthorized) end end context 'when access_token is given' do it 'should return activities as FbGraph::Page' do activities = FbGraph::User.new('arjun', :access_token => 'access_token').activities activities.first.should == FbGraph::Page.new( '378209722137', :access_token => 'access_token', :name => 'Doing Things at the Last Minute', :category => '活動' ) activities.each do |activity| activity.should be_instance_of(FbGraph::Page) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems