Sha256: a7f3a9421f5df2151473b3fd502252ac772f00c14a9a176f0be22bb5c6be8d85
Contents?: true
Size: 1.13 KB
Versions: 104
Compression:
Stored size: 1.13 KB
Contents
require 'spec_helper' describe FbGraph::Connections::Links, '#links' do context 'when included by FbGraph::User' do it 'should return notes as FbGraph::Link' do mock_graph :get, 'matake/links', 'users/links/matake_private', :access_token => 'access_token' 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 end end describe FbGraph::Connections::Links, '#link!' do context 'when included by FbGraph::User' do it 'should return generated link' do mock_graph :post, 'matake/links', 'users/links/post_with_valid_access_token' 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 end
Version data entries
104 entries across 104 versions & 1 rubygems