Sha256: ed69b2987f9567d8b17918f9274653b104f697675d3cf5878654eacc39892dbc
Contents?: true
Size: 975 Bytes
Versions: 25
Compression:
Stored size: 975 Bytes
Contents
require File.join(File.dirname(__FILE__), '../spec_helper') describe FbGraph::Auth, '.new' do it 'should setup OAuth2::Client' do auth = FbGraph::Auth.new('client_id', 'client_secret') auth.client.should be_a(OAuth2::Client) auth.client.id.should == 'client_id' auth.client.secret.should == 'client_secret' end context 'when invalid cookie given' do it 'should raise FbGraph::VerificationFailed' do lambda do FbGraph::Auth.new('client_id', 'client_secret', :cookie => 'invalid') end.should raise_exception(FbGraph::Auth::VerificationFailed) end end end describe FbGraph::Auth, '.from_cookie' do before do @auth = FbGraph::Auth.new('client_id', 'client_secret') end context 'when invalid cookie given' do it 'should raise FbGraph::VerificationFailed' do lambda do @auth.from_cookie('invalid') end.should raise_exception(FbGraph::Auth::VerificationFailed) end end end
Version data entries
25 entries across 25 versions & 2 rubygems