Sha256: a7ba778a90018729f99dcc24f642433473532607db476578394b44c92d87a7d6
Contents?: true
Size: 1.12 KB
Versions: 1
Compression:
Stored size: 1.12 KB
Contents
require 'spec_helper' describe FbGraph::Connections::Links, '#links' do context 'when included by FbGraph::User' do before 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 end describe FbGraph::Connections::Links, '#link!' do context 'when included by FbGraph::User' 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fb_graph-1.7.1 | spec/fb_graph/connections/links_spec.rb |