Sha256: e32c1760fe05f699fbac26e81ad06692b23b2484b8ef03e6867e3f99476a8c43
Contents?: true
Size: 965 Bytes
Versions: 1
Compression:
Stored size: 965 Bytes
Contents
require 'spec_helper' describe FbGraph::Searchable do context 'when included by FbGraph::Page' do it 'should with type=page' do lambda do FbGraph::Page.search('FbGraph') end.should request_to('search?q=FbGraph&type=page') end end end describe FbGraph::Searchable::Result do before do fake_json :get, 'search?q=fbgraph&type=page', 'pages/search_fb_graph' fake_json :get, 'search?limit=25&offset=25&q=google&type=page', 'pages/search_google' @fb_graph = FbGraph::Page.search('fbgraph') @google_page2 = FbGraph::Page.search('google', :limit => 25, :offset => 25) end it 'should support pagination' do @fb_graph.next.should == [] @fb_graph.previous.should == [] lambda do @google_page2.next end.should request_to('search?limit=25&offset=50&q=google&type=page') lambda do @google_page2.previous end.should request_to('search?limit=25&offset=0&q=google&type=page') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fb_graph-1.7.1 | spec/fb_graph/searchable_spec.rb |