Sha256: 7466975f9e5fc2b039cc6786717974a2cd767afb8786dcf2fa3146ac8fcd7f39

Contents?: true

Size: 1.2 KB

Versions: 19

Compression:

Stored size: 1.2 KB

Contents

require File.expand_path('../../../spec_helper', __FILE__)

describe FBGraph do
  describe FBGraph::Search do

    before :each do
      @client_id = 'client_id'
      @secret_id = 'secret_id'
      @client = FBGraph::Client.new(:client_id => @client_id,
                                    :secret_id => @secret_id)
      @search = FBGraph::Search.new(@client)                              
    end

    describe "initialization" do
      it "should set @object with 'search'" do
        @search.objects.should == 'search'
      end
    end


    describe 'instance methods' do
      
      describe '.query' do
        before(:each) do
          @result = @search.query('query')
        end
        it 'should return self' do
          @result.should == @search
        end
        it "should assign in params[:q] 'query'" do
          @search.params[:q].should == 'query'
        end
      end
      describe '.on' do
        before(:each) do
          @result = @search.on('type')
        end
        it 'should return self' do
          @result.should == @search
        end
        it "should assign in params[:type] 'type'" do
          @search.params[:type].should == 'type'
        end
      end
    end
    
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
fbgraph-1.10.0 specs/lib/fbauth/search_spec.rb
fbgraph-1.9.0 specs/lib/fbauth/search_spec.rb
fbgraph-1.8.4 specs/lib/fbauth/search_spec.rb
fbgraph-1.8.3 specs/lib/fbauth/search_spec.rb
fbgraph-1.8.0 specs/lib/fbauth/search_spec.rb
fbgraph-1.7.1 specs/lib/fbauth/search_spec.rb
fbgraph-1.7.0 specs/lib/fbauth/search_spec.rb
fbgraph-1.6.0 specs/lib/fbauth/search_spec.rb
fbgraph-1.5.4 specs/lib/fbauth/search_spec.rb
fbgraph-1.5.2 specs/lib/fbauth/search_spec.rb
fbgraph-0.1.6.4.1 specs/lib/fbauth/search_spec.rb
fbgraph-0.1.6.4 specs/lib/fbauth/search_spec.rb
fbgraph-0.1.6.3 specs/lib/fbauth/search_spec.rb
fbgraph-0.1.6.1 specs/lib/fbauth/search_spec.rb
fbgraph-0.1.6 specs/lib/fbauth/search_spec.rb
fbgraph-0.1.4 specs/lib/fbauth/search_spec.rb
fbgraph-0.1.1 specs/lib/fbauth/search_spec.rb
fbgraph-0.0.9 specs/lib/fbauth/search_spec.rb
fbgraph-0.0.8 specs/lib/fbauth/search_spec.rb