Sha256: 5bba34016658b0914d701ebf3422714a8cbf4805cc0244f723ee2cf84bd54c38

Contents?: true

Size: 1.12 KB

Versions: 20

Compression:

Stored size: 1.12 KB

Contents

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

context 'when included by FbGraph::User' do
  describe FbGraph::Connections::Links, '#links' do
    before(:all) do
      fake_json(:get, 'matake/links?access_token=access_token', 'users/links/matake_private')
    end

    it 'should return notes as FbGraph::Link' do
      links = FbGraph::User.new('matake', :access_token => 'access_token').links
      links.each do |link|
        link.should be_instance_of(FbGraph::Link)
      end
    end
  end

  describe FbGraph::Connections::Links, '#link!' do
    before do
      fake_json(:post, 'matake/links', 'users/links/post_with_valid_access_token')
    end

    it 'should return generated link' do
      link = FbGraph::User.new('matake', :access_token => 'valid').link!(
        :link => 'http://github.com/nov/fb_graph',
        :message => 'A Ruby wrapper for Facebook Graph API.'
      )
      link.identifier.should == 120765121284251
      link.link.should == 'http://github.com/nov/fb_graph'
      link.message.should == 'A Ruby wrapper for Facebook Graph API.'
      link.access_token.should == 'valid'
    end
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
fb_graph-1.0.7 spec/fb_graph/connections/links_spec.rb
fb_graph-1.0.6 spec/fb_graph/connections/links_spec.rb
fb_graph-1.0.5 spec/fb_graph/connections/links_spec.rb
palidanx-fb_graph-1.0.4 spec/fb_graph/connections/links_spec.rb
fb_graph-1.0.4 spec/fb_graph/connections/links_spec.rb
fb_graph-1.0.3 spec/fb_graph/connections/links_spec.rb
fb_graph-1.0.2 spec/fb_graph/connections/links_spec.rb
fb_graph-1.0.1 spec/fb_graph/connections/links_spec.rb
fb_graph-1.0.0 spec/fb_graph/connections/links_spec.rb
fb_graph-0.8.0 spec/fb_graph/connections/links_spec.rb
fb_graph-0.7.3 spec/fb_graph/connections/links_spec.rb
fb_graph-0.7.2 spec/fb_graph/connections/links_spec.rb
fb_graph-0.7.1 spec/fb_graph/connections/links_spec.rb
fb_graph-0.7.0 spec/fb_graph/connections/links_spec.rb
fb_graph-0.6.0 spec/fb_graph/connections/links_spec.rb
fb_graph-0.5.0 spec/fb_graph/connections/links_spec.rb
fb_graph-0.4.2 spec/fb_graph/connections/links_spec.rb
fb_graph-0.4.1 spec/fb_graph/connections/links_spec.rb
fb_graph-0.4.0 spec/fb_graph/connections/links_spec.rb
fb_graph-0.3.0 spec/fb_graph/connections/links_spec.rb