Sha256: 67c86ded6b174b1dc264c3323cee720c77f7f4c24e89011d66453658186af126

Contents?: true

Size: 637 Bytes

Versions: 14

Compression:

Stored size: 637 Bytes

Contents

require 'spec_helper'

describe FbGraph::Auth::Cookie, '.parse' do
  before do
    @client = Rack::OAuth2::Client.new(:identifier => 'client_id', :secret => 'client_secret')
    @cookie = {
      'fbs_client_id' => "access_token=t&expires=0&secret=s&session_key=k&sig=f4bae8ec88ba11440e3bdcc1bcf78317&uid=12345"
    }
  end

  it 'should parse fbs_APP_ID cookie' do
    cookie = FbGraph::Auth::Cookie.parse(@client, @cookie)
    cookie[:access_token].should == 't'
    cookie[:expires].should      == 0
    cookie[:secret].should       == 's'
    cookie[:session_key].should  == 'k'
    cookie[:uid].should          == '12345'
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fb_graph-1.8.6 spec/fb_graph/auth/cookie_spec.rb
fb_graph-1.8.5 spec/fb_graph/auth/cookie_spec.rb
fb_graph-1.8.4 spec/fb_graph/auth/cookie_spec.rb
fb_graph-1.8.3 spec/fb_graph/auth/cookie_spec.rb
fb_graph-1.8.2 spec/fb_graph/auth/cookie_spec.rb
fb_graph-1.8.1 spec/fb_graph/auth/cookie_spec.rb
fb_graph-1.8.0 spec/fb_graph/auth/cookie_spec.rb
fb_graph-1.8.0.alpha2 spec/fb_graph/auth/cookie_spec.rb
fb_graph-1.7.5 spec/fb_graph/auth/cookie_spec.rb
fb_graph-1.8.0.alpha spec/fb_graph/auth/cookie_spec.rb
fb_graph-1.7.4 spec/fb_graph/auth/cookie_spec.rb
fb_graph-1.7.3 spec/fb_graph/auth/cookie_spec.rb
fb_graph-1.7.2 spec/fb_graph/auth/cookie_spec.rb
fb_graph-1.7.1 spec/fb_graph/auth/cookie_spec.rb