Sha256: 8c29794731959091213bcce5a46f28700cfb37f04634935d3b609170aa437ef9
Contents?: true
Size: 1013 Bytes
Versions: 37
Compression:
Stored size: 1013 Bytes
Contents
require 'spec_helper' describe FbGraph::Connections::Notifications do describe '#notifications' do it 'should return notifications as FbGraph::Notification' do mock_graph :get, 'me/notifications', 'users/notifications/all', :params => { :include_read => 'true' }, :access_token => 'access_token' do notifications = FbGraph::User.me('access_token').notifications(:include_read => true) notifications.each do |notification| notification.should be_instance_of FbGraph::Notification end end end end describe '#notification!' do it 'should return success json' do mock_graph :post, 'matake/notifications', 'success', :params => { :template => 'hello' }, :access_token => 'app_access_token' do response = FbGraph::User.new('matake').notification!( :access_token => 'app_access_token', :template => 'hello' ) response.should == {'success' => true} end end end end
Version data entries
37 entries across 37 versions & 1 rubygems