Sha256: dae1b04bb999cce888dd2f8edd0b8eedfe913a38965d5cbfed80b0601cea8b3c

Contents?: true

Size: 958 Bytes

Versions: 7

Compression:

Stored size: 958 Bytes

Contents

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

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

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

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

7 entries across 7 versions & 1 rubygems

Version Path
fb_graph-0.0.7 spec/fb_graph/connections/picture_spec.rb
fb_graph-0.0.6 spec/fb_graph/connections/picture_spec.rb
fb_graph-0.0.5 spec/fb_graph/connections/picture_spec.rb
fb_graph-0.0.4 spec/fb_graph/connections/picture_spec.rb
fb_graph-0.0.3 spec/fb_graph/connections/picture_spec.rb
fb_graph-0.0.2 spec/fb_graph/connections/picture_spec.rb
fb_graph-0.0.1 spec/fb_graph/connections/picture_spec.rb