Sha256: e19582ff9f53e7ceb49cae4e8869d0cb2150de7daf317be62eb59a9e8b8b8e75

Contents?: true

Size: 961 Bytes

Versions: 16

Compression:

Stored size: 961 Bytes

Contents

require 'spec_helper'

describe FbGraph::Page do
  let(:attributes) do
    {
      :id       => '19292868552',
      :category => 'Technology',
      :likes    => 578246,
      :name     => 'Facebook Platform',
      :username => 'platform'
    }
  end
  subject do
    FbGraph::Page.new(attributes[:id], attributes)
  end

  its(:identifier) { should == attributes[:id]       }
  its(:category)   { should == attributes[:category] }
  its(:like_count) { should == attributes[:likes]    }
  its(:name)       { should == attributes[:name]     }
  its(:username)   { should == attributes[:username] }

  describe '.fetch' do
    subject do
      mock_graph :get, 'platform', 'pages/platform_public' do
        FbGraph::Page.fetch('platform')
      end
    end
    its(:identifier) { should == '19292868552' }
    its(:name)       { should == 'Facebook Platform' }
    its(:category)   { should == 'Technology' }
    its(:like_count) { should == 578214 }
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
fb_graph-1.9.2 spec/fb_graph/page_spec.rb
fb_graph-1.9.1 spec/fb_graph/page_spec.rb
fb_graph-1.9.0 spec/fb_graph/page_spec.rb
fb_graph-1.8.6 spec/fb_graph/page_spec.rb
fb_graph-1.8.5 spec/fb_graph/page_spec.rb
fb_graph-1.8.4 spec/fb_graph/page_spec.rb
fb_graph-1.8.3 spec/fb_graph/page_spec.rb
fb_graph-1.8.2 spec/fb_graph/page_spec.rb
fb_graph-1.8.1 spec/fb_graph/page_spec.rb
fb_graph-1.8.0 spec/fb_graph/page_spec.rb
fb_graph-1.8.0.alpha2 spec/fb_graph/page_spec.rb
fb_graph-1.7.5 spec/fb_graph/page_spec.rb
fb_graph-1.8.0.alpha spec/fb_graph/page_spec.rb
fb_graph-1.7.4 spec/fb_graph/page_spec.rb
fb_graph-1.7.3 spec/fb_graph/page_spec.rb
fb_graph-1.7.2 spec/fb_graph/page_spec.rb