Sha256: c83704235106e043d0f2f4eed15dac17ae46b541a17d661655435b647d0d98fc

Contents?: true

Size: 915 Bytes

Versions: 79

Compression:

Stored size: 915 Bytes

Contents

require '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

79 entries across 79 versions & 1 rubygems

Version Path
fb_graph-2.5.5 spec/fb_graph/connections/picture_spec.rb
fb_graph-2.5.4 spec/fb_graph/connections/picture_spec.rb
fb_graph-2.5.3 spec/fb_graph/connections/picture_spec.rb
fb_graph-2.5.2 spec/fb_graph/connections/picture_spec.rb
fb_graph-2.5.1 spec/fb_graph/connections/picture_spec.rb
fb_graph-2.5.0 spec/fb_graph/connections/picture_spec.rb
fb_graph-2.4.20 spec/fb_graph/connections/picture_spec.rb
fb_graph-2.4.19 spec/fb_graph/connections/picture_spec.rb
fb_graph-2.4.18 spec/fb_graph/connections/picture_spec.rb
fb_graph-2.4.17 spec/fb_graph/connections/picture_spec.rb
fb_graph-2.4.16 spec/fb_graph/connections/picture_spec.rb
fb_graph-2.4.15 spec/fb_graph/connections/picture_spec.rb
fb_graph-2.4.14 spec/fb_graph/connections/picture_spec.rb
fb_graph-2.4.13 spec/fb_graph/connections/picture_spec.rb
fb_graph-2.4.12 spec/fb_graph/connections/picture_spec.rb
fb_graph-2.4.11 spec/fb_graph/connections/picture_spec.rb
fb_graph-2.4.10 spec/fb_graph/connections/picture_spec.rb
fb_graph-2.4.9 spec/fb_graph/connections/picture_spec.rb
fb_graph-2.4.8 spec/fb_graph/connections/picture_spec.rb
fb_graph-2.4.7 spec/fb_graph/connections/picture_spec.rb