Sha256: 352faecf9dd29be1d812dcdc24adef489cd456e9f972e52a1b1c417c09623784

Contents?: true

Size: 909 Bytes

Versions: 28

Compression:

Stored size: 909 Bytes

Contents

require 'spec_helper'

describe FbGraph::Connections::PromotablePosts do
  describe '#promotable_posts' do
    it 'should return promotable posts the user created as FbGraph::Post' do
      mock_graph :get, 'FbGraph/promotable_posts', 'pages/promotable_posts/sample', :access_token => 'access_token' do
        posts = FbGraph::Page.new('FbGraph', :access_token => 'access_token').promotable_posts
        posts.class.should == FbGraph::Connection
        posts.count.should == 4
        posts.each.with_index do |post, index|
          post.should be_instance_of FbGraph::PromotablePost
          case index
          when 0
            post.is_published.should be_false
            post.scheduled_publish_time.should == Time.at(1352473200)
          else
            post.is_published.should be_true
            post.scheduled_publish_time.should be_nil
          end
        end
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

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