Sha256: 5d884fe9e6860304c58a93f2cd0f12153e65d8942af8ddefad91ac871a6e95b5

Contents?: true

Size: 956 Bytes

Versions: 72

Compression:

Stored size: 956 Bytes

Contents

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

describe FbGraph::Connections::Picture, '#picture' do

  context 'when included by FbGraph::User' do
    it 'should return image url' do
      FbGraph::User.new('matake').picture.should == File.join(FbGraph::ROOT_URL, 'matake/picture')
    end

    it 'should support size option' do
      [:square, :large].each do |size|
        FbGraph::User.new('matake').picture(size).should == File.join(FbGraph::ROOT_URL, "matake/picture?type=#{size}")
      end
    end
  end

  context 'when included by FbGraph::Page' do
    it 'should return image url' do
      FbGraph::Page.new('platform').picture.should == File.join(FbGraph::ROOT_URL, 'platform/picture')
    end

    it 'should support size option' do
      [:square, :large].each do |size|
        FbGraph::Page.new('platform').picture(size).should == File.join(FbGraph::ROOT_URL, "platform/picture?type=#{size}")
      end
    end
  end

end

Version data entries

72 entries across 72 versions & 2 rubygems

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