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

Edge::OpenGraph::Actions isn't included by User anymore

This commit is contained in:
nov 2017-02-28 18:06:28 +09:00
parent 7502807061
commit 847f7cb338

View file

@ -1,28 +0,0 @@
require 'spec_helper'
describe FbGraph2::Edge::OpenGraph::Actions do
context 'included in User' do
describe '#og_actions' do
let(:me) { FbGraph2::User.me('token') }
it 'should return an Array of FbGraph2::Post' do
actions = mock_graph :get, 'me/og.likes', 'user/og_actions_likes', access_token: 'token' do
me.og_actions 'og.likes'
end
actions.should be_instance_of FbGraph2::Edge
actions.should_not be_blank
actions.each do |action|
action.should be_instance_of FbGraph2::OpenGraph::Action
end
end
end
describe '#og_action!' do
let(:user) { FbGraph2::User.new('user_id') }
it 'should return a FbGraph2::Post' do
mock_graph :post, 'user_id/og.likes', 'success_with_id', access_token: 'app_token' do
user.authenticate('app_token').og_action! 'og.likes', object: 'https://github.com/nov/fb_graph2/'
end.should be_instance_of FbGraph2::OpenGraph::Action
end
end
end
end