Sha256: 6cc2bdb2296d9d1c9ce3ce277c6dea0e42902e2a685d64ff13d77092b4c2da5b

Contents?: true

Size: 906 Bytes

Versions: 20

Compression:

Stored size: 906 Bytes

Contents

require File.join(File.dirname(__FILE__), '../../spec_helper')

describe FbGraph::Connections::Senders, '#senders' do
  before do
    fake_json(:get, '12345/senders?access_token=access_token&no_cache=true', 'thread/senders/private')
  end

  it 'should use cached contents as default' do
    lambda do
      FbGraph::Thread.new(12345, :access_token => 'access_token').senders
    end.should_not request_to '12345/senders?access_token=access_token'
  end

  it 'should not use cached contents when options are specified' do
    lambda do
      FbGraph::Thread.new(12345).senders(:no_cache => true)
    end.should request_to '12345/senders?no_cache=true'
  end

  it 'should return senders as FbGraph::User' do
    senders = FbGraph::Thread.new(12345, :access_token => 'access_token').senders(:no_cache => true)
    senders.each do |sender|
      sender.should be_instance_of(FbGraph::User)
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
fb_graph-1.7.0 spec/fb_graph/connections/senders_spec.rb
fb_graph-1.7.0.alpha2 spec/fb_graph/connections/senders_spec.rb
fb_graph-1.6.9 spec/fb_graph/connections/senders_spec.rb
fb_graph-1.7.0.alpha spec/fb_graph/connections/senders_spec.rb
fb_graph-1.6.8 spec/fb_graph/connections/senders_spec.rb
fb_graph-1.6.7 spec/fb_graph/connections/senders_spec.rb
fb_graph-1.6.5 spec/fb_graph/connections/senders_spec.rb
fb_graph-1.6.4 spec/fb_graph/connections/senders_spec.rb
fb_graph-1.6.3 spec/fb_graph/connections/senders_spec.rb
fb_graph-1.6.2 spec/fb_graph/connections/senders_spec.rb
fb_graph-1.6.1 spec/fb_graph/connections/senders_spec.rb
fb_graph-1.6.0 spec/fb_graph/connections/senders_spec.rb
fb_graph-1.5.5 spec/fb_graph/connections/senders_spec.rb
fb_graph-1.5.4 spec/fb_graph/connections/senders_spec.rb
fb_graph-1.5.3 spec/fb_graph/connections/senders_spec.rb
fb_graph-1.5.2 spec/fb_graph/connections/senders_spec.rb
fb_graph-1.5.1 spec/fb_graph/connections/senders_spec.rb
fb_graph-1.5.0 spec/fb_graph/connections/senders_spec.rb
fb_graph-1.4.1 spec/fb_graph/connections/senders_spec.rb
fb_graph-1.4.0 spec/fb_graph/connections/senders_spec.rb