Sha256: 6f44df636c4979704244fa110fd647b94a355b7e6d7f737dbed874356a1cfd31

Contents?: true

Size: 1.06 KB

Versions: 14

Compression:

Stored size: 1.06 KB

Contents

require File.expand_path('../../../spec_helper', __FILE__)

describe FBGraph do
  describe FBGraph::Selection do

    before :each do
      @client_id = 'client_id'
      @secret_id = 'secret_id'
      @token = 'token'
      @client = FBGraph::Client.new(:client_id => @client_id,
                                    :secret_id => @secret_id,
                                    :token => @token)
      @selection = FBGraph::Selection.new(@client)
    end
    
    describe "when asking for an object's picture" do
      it "should append the access token" do
        @selection.me.picture.should ==
            "https://graph.facebook.com/me/picture?access_token=#{@token}"
      end
      
      it "should not append an access token if none is available" do
        client = FBGraph::Client.new(:client_id => @client_id,
                                     :secret_id => @secret_id)
        selection = FBGraph::Selection.new(client)                              

        selection.me.picture.should ==
            "https://graph.facebook.com/me/picture"
      end
    end
  end  
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fbgraph-1.7.1 specs/lib/fbauth/selection_spec.rb
fbgraph-1.7.0 specs/lib/fbauth/selection_spec.rb
fbgraph-1.6.0 specs/lib/fbauth/selection_spec.rb
fbgraph-1.5.4 specs/lib/fbauth/selection_spec.rb
fbgraph-1.5.2 specs/lib/fbauth/selection_spec.rb
fbgraph-0.1.6.4.1 specs/lib/fbauth/selection_spec.rb
fbgraph-0.1.6.4 specs/lib/fbauth/selection_spec.rb
fbgraph-0.1.6.3 specs/lib/fbauth/selection_spec.rb
fbgraph-0.1.6.1 specs/lib/fbauth/selection_spec.rb
fbgraph-0.1.6 specs/lib/fbauth/selection_spec.rb
fbgraph-0.1.4 specs/lib/fbauth/selection_spec.rb
fbgraph-0.1.1 specs/lib/fbauth/selection_spec.rb
fbgraph-0.0.9 specs/lib/fbauth/selection_spec.rb
fbgraph-0.0.8 specs/lib/fbauth/selection_spec.rb