1
0
Fork 0
mirror of https://github.com/nov/fb_graph2 synced 2023-03-27 23:22:15 -04:00

User#applications spec

This commit is contained in:
nov 2014-09-04 17:39:50 +09:00
parent 194039cd1a
commit 08b290c3ef
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,20 @@
require 'spec_helper'
describe FbGraph2::Edge::Applications do
context 'included in User' do
let(:me) { FbGraph2::User.me('token') }
describe '#applications' do
it 'should return an Array of FbGraph2::App' do
apps = mock_graph :get, 'me/applications/developer', 'user/applications', access_token: 'token' do
me.applications
end
apps.should be_instance_of FbGraph2::Edge
apps.should_not be_blank
apps.each do |app|
app.should be_instance_of FbGraph2::App
end
end
end
end
end

View file

@ -0,0 +1,16 @@
{
"data": [{
"name": "gem sample",
"namespace": "gem-sample",
"id": "210798282372757"
}, {
"name": "Localhost",
"id": "158245434257042"
}, {
"name": "OAuth.jp",
"id": "126213067419995"
}],
"paging": {
"next": "https://graph.facebook.com/v2.1/579612276/applications?type=developer&limit=25&offset=25&__after_id=***"
}
}