Sha256: 8c25b788cd00edca50d35689a83853ae3e545e7801ac166bdd259878e6318a15

Contents?: true

Size: 657 Bytes

Versions: 82

Compression:

Stored size: 657 Bytes

Contents

require 'spec_helper'

describe FbGraph::Connections::Admins do
  let(:page) { FbGraph::Page.new('FbGraph', :access_token => 'page_token') }
  context 'when given user is admin' do
    it 'should be true' do
      mock_graph :get, 'FbGraph/admins/matake', 'pages/admins/sample', :access_token => 'page_token' do
        page.admin?(FbGraph::User.new('matake')).should be_true
      end
    end
  end

  context 'otherwise' do
    it 'should be false' do
      mock_graph :get, 'FbGraph/admins/nov.matake', 'pages/admins/blank', :access_token => 'page_token' do
        page.admin?(FbGraph::User.new('nov.matake')).should be_false
      end
    end
  end
end

Version data entries

82 entries across 82 versions & 1 rubygems

Version Path
fb_graph-2.7.17 spec/fb_graph/connections/admins_spec.rb
fb_graph-2.7.16 spec/fb_graph/connections/admins_spec.rb
fb_graph-2.7.15 spec/fb_graph/connections/admins_spec.rb
fb_graph-2.7.14 spec/fb_graph/connections/admins_spec.rb
fb_graph-2.7.13 spec/fb_graph/connections/admins_spec.rb
fb_graph-2.7.12 spec/fb_graph/connections/admins_spec.rb
fb_graph-2.7.11 spec/fb_graph/connections/admins_spec.rb
fb_graph-2.7.10 spec/fb_graph/connections/admins_spec.rb
fb_graph-2.7.9 spec/fb_graph/connections/admins_spec.rb
fb_graph-2.7.8 spec/fb_graph/connections/admins_spec.rb
fb_graph-2.7.7 spec/fb_graph/connections/admins_spec.rb
fb_graph-2.7.6 spec/fb_graph/connections/admins_spec.rb
fb_graph-2.7.5 spec/fb_graph/connections/admins_spec.rb
fb_graph-2.7.4 spec/fb_graph/connections/admins_spec.rb
fb_graph-2.7.3 spec/fb_graph/connections/admins_spec.rb
fb_graph-2.7.2 spec/fb_graph/connections/admins_spec.rb
fb_graph-2.7.1 spec/fb_graph/connections/admins_spec.rb
fb_graph-2.7.0 spec/fb_graph/connections/admins_spec.rb
fb_graph-2.6.7 spec/fb_graph/connections/admins_spec.rb
fb_graph-2.6.6 spec/fb_graph/connections/admins_spec.rb