mirror of
https://github.com/nov/fb_graph2
synced 2023-03-27 23:22:15 -04:00
4a49e6faa8
* default v2.4 * links edge is no longer available. use feed https://developers.facebook.com/docs/apps/changelog#v2_4_changes * statuses edge is no longer available. use feed https://developers.facebook.com/docs/apps/changelog#v2_4_changes * invited edge is no longer available https://developers.facebook.com/docs/apps/changelog#v2_4_changes * home edge is no longer available. https://developers.facebook.com/docs/apps/changelog#v2_4_changes * inbox edge is no longer available. https://developers.facebook.com/docs/apps/changelog#v2_4_changes * notifications and outbox edges are no longer availabe. https://developers.facebook.com/docs/apps/changelog#v2_4_changes ps. outbox isn't mentioned in the doc, but read_mailbox deprecation causes outbox deprecation too. * update graph api version to 2.8 * update gem version * remove applications edge * update message_tags json data format * align with features in v2.8 * align with features in v2.7 * align with features in v2.6 * align with features in v2.5 * align with features in v2.4
40 lines
No EOL
1.1 KiB
Ruby
40 lines
No EOL
1.1 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe FbGraph2 do
|
|
subject { FbGraph2 }
|
|
after { FbGraph2.debugging = false }
|
|
|
|
context 'as default' do
|
|
its(:logger) { should be_a Logger }
|
|
its(:api_version) { should == 'v2.8' }
|
|
its(:root_url) { should == 'https://graph.facebook.com' }
|
|
it { should_not be_debugging }
|
|
end
|
|
|
|
describe '.debug!' do
|
|
before { FbGraph2.debug! }
|
|
it { should be_debugging }
|
|
end
|
|
|
|
describe '.http_client' do
|
|
context 'with http_config' do
|
|
before do
|
|
FbGraph2.http_config do |config|
|
|
config.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
|
config.connect_timeout = 30
|
|
config.send_timeout = 40
|
|
config.receive_timeout = 60
|
|
end
|
|
end
|
|
|
|
it 'should configure Rack::OAuth2 and FbGraph2 http_client' do
|
|
[Rack::OAuth2, FbGraph2].each do |klass|
|
|
klass.http_client.ssl_config.verify_mode.should == OpenSSL::SSL::VERIFY_NONE
|
|
klass.http_client.connect_timeout.should == 30
|
|
klass.http_client.send_timeout.should == 40
|
|
klass.http_client.receive_timeout.should == 60
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end |