Sha256: 5e516bd40c9a8f4b8a7787f2a38ff3da1936348922f7e945d56cc1a0d8e19691

Contents?: true

Size: 989 Bytes

Versions: 34

Compression:

Stored size: 989 Bytes

Contents

require 'spec_helper'

describe FbGraph::Connections::AppRequests do
  describe '#app_requests' do
    it 'should return an Array of FbGraph::AppRequest' do
      mock_graph :get, 'me/apprequests', 'users/app_requests/me_private', :access_token => 'access_token' do
        app_requests = FbGraph::User.me('access_token').app_requests
        app_requests.each do |app_request|
          app_request.should be_instance_of FbGraph::AppRequest
        end
      end
    end
  end

  describe '#app_request!' do
    it 'should return FbGraph::AppRequest' do
      mock_graph :post, 'me/apprequests', 'users/app_requests/created', :access_token => 'access_token', :params => {
        :message => 'Message', :data => 'Data'
      } do
        app_request = FbGraph::User.me('access_token').app_request! :message => 'Message', :data => 'Data'
        app_request.should be_instance_of FbGraph::AppRequest
        app_request.identifier.should == "10150353183952277"
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
fb_graph-2.4.16 spec/fb_graph/connections/app_requests_spec.rb
fb_graph-2.4.15 spec/fb_graph/connections/app_requests_spec.rb
fb_graph-2.4.14 spec/fb_graph/connections/app_requests_spec.rb
fb_graph-2.4.13 spec/fb_graph/connections/app_requests_spec.rb
fb_graph-2.4.12 spec/fb_graph/connections/app_requests_spec.rb
fb_graph-2.4.11 spec/fb_graph/connections/app_requests_spec.rb
fb_graph-2.4.10 spec/fb_graph/connections/app_requests_spec.rb
fb_graph-2.4.9 spec/fb_graph/connections/app_requests_spec.rb
fb_graph-2.4.8 spec/fb_graph/connections/app_requests_spec.rb
fb_graph-2.4.7 spec/fb_graph/connections/app_requests_spec.rb
fb_graph-2.4.6 spec/fb_graph/connections/app_requests_spec.rb
fb_graph-2.4.4 spec/fb_graph/connections/app_requests_spec.rb
fb_graph-2.4.3 spec/fb_graph/connections/app_requests_spec.rb
fb_graph-2.4.2 spec/fb_graph/connections/app_requests_spec.rb
fb_graph-2.4.1 spec/fb_graph/connections/app_requests_spec.rb
fb_graph-2.4.0 spec/fb_graph/connections/app_requests_spec.rb
fb_graph-2.3.2 spec/fb_graph/connections/app_requests_spec.rb
fb_graph-2.3.1 spec/fb_graph/connections/app_requests_spec.rb
fb_graph-2.3.0 spec/fb_graph/connections/app_requests_spec.rb
fb_graph-2.2.6 spec/fb_graph/connections/app_requests_spec.rb