Sha256: e427aa3b8b2303ff35d991dec5425c1a508e2aaaf710ea66a28830cf2d024aa3
Contents?: true
Size: 709 Bytes
Versions: 37
Compression:
Stored size: 709 Bytes
Contents
require 'spec_helper' describe FbGraph::Connections::AppNotifications do let(:app) do _app_ = FbGraph::Application.new('app_id', :secret => 'app_secret') _app_.should_receive(:get_access_token).and_return( Rack::OAuth2::AccessToken::Legacy.new(:access_token => 'app_access_token') ) _app_ end describe '#notify!' do it 'should return success json' do mock_graph :post, 'matake/notifications', 'success', :params => { :template => 'hello' }, :access_token => 'app_access_token' do user = FbGraph::User.new('matake') response = app.notify! user, :template => 'hello' response.should == {'success' => true} end end end end
Version data entries
37 entries across 37 versions & 1 rubygems