Sha256: 3a9bd4f6c81728e592a9cf86cbbb92b943e227d1095ea52cd18bb38dcf3b6cf6

Contents?: true

Size: 1.09 KB

Versions: 5

Compression:

Stored size: 1.09 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?type=square&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?type=square"
      end
    end
  end  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fbgraph-1.10.0 specs/lib/fbauth/selection_spec.rb
fbgraph-1.9.0 specs/lib/fbauth/selection_spec.rb
fbgraph-1.8.4 specs/lib/fbauth/selection_spec.rb
fbgraph-1.8.3 specs/lib/fbauth/selection_spec.rb
fbgraph-1.8.0 specs/lib/fbauth/selection_spec.rb