Sha256: ecc9d1af3e602420fb5a3866bb1b5d1c286fe67ffe2304c1d9639716a0c6e374

Contents?: true

Size: 838 Bytes

Versions: 15

Compression:

Stored size: 838 Bytes

Contents

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

describe FbGraph::Checkin, '.new' do
  # TODO
end

describe FbGraph::Checkin, '.search' do
  before(:all) do
    fake_json(:get, 'search?type=checkin', 'checkins/search_public')
    fake_json(:get, 'search?type=checkin&access_token=access_token', 'checkins/search_private')
  end

  context 'when no access_token given' do
    it 'should raise FbGraph::Unauthorized' do
      lambda do
        FbGraph::Checkin.search
      end.should raise_exception(FbGraph::Unauthorized)
    end
  end

  context 'when access_token is given' do
    it 'should return checkins as FbGraph::Checkin' do
      checkins = FbGraph::Checkin.search(:access_token => 'access_token')
      checkins.each do |checkin|
        checkin.should be_instance_of(FbGraph::Checkin)
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
fb_graph-1.1.6 spec/fb_graph/checkin_spec.rb
fb_graph-1.1.5 spec/fb_graph/checkin_spec.rb
fb_graph-1.1.4 spec/fb_graph/checkin_spec.rb
fb_graph-1.1.3 spec/fb_graph/checkin_spec.rb
fb_graph-1.1.2 spec/fb_graph/checkin_spec.rb
fb_graph-1.1.1 spec/fb_graph/checkin_spec.rb
fb_graph-1.1.0 spec/fb_graph/checkin_spec.rb
fb_graph-1.0.7 spec/fb_graph/checkin_spec.rb
fb_graph-1.0.6 spec/fb_graph/checkin_spec.rb
fb_graph-1.0.5 spec/fb_graph/checkin_spec.rb
palidanx-fb_graph-1.0.4 spec/fb_graph/checkin_spec.rb
fb_graph-1.0.4 spec/fb_graph/checkin_spec.rb
fb_graph-1.0.3 spec/fb_graph/checkin_spec.rb
fb_graph-1.0.2 spec/fb_graph/checkin_spec.rb
fb_graph-1.0.1 spec/fb_graph/checkin_spec.rb