Sha256: 1941a071e2d779031f8db993ebac039868626906e6a55726c47356885bd0cf0c

Contents?: true

Size: 697 Bytes

Versions: 35

Compression:

Stored size: 697 Bytes

Contents

# coding: utf-8
#
require 'spec_helper'
require 'picky-client/spec'

describe 'Integration Tests' do
  
  before(:all) do
    Picky::Indexes.index_for_tests
    Picky::Indexes.load_from_cache
  end
  
  let(:books) { Picky::TestClient.new(BookSearch, :path => '/books') }

  # Testing a count of results.
  #
  it { books.search('a s').total.should == 42 }
  
  # Testing a specific order of result ids.
  #
  it { books.search('alan').ids.should == [449, 259, 307] }
  
  # Testing an order of result categories.
  #
  it { books.search('alan').should have_categories(['title'], ['author']) }
  it { books.search('alan p').should have_categories(['title', 'author'], ['author', 'title']) }
  
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
picky-generators-3.5.4 prototypes/server/shared/spec/integration_spec.rb
picky-generators-3.5.3 prototypes/server/shared/spec/integration_spec.rb
picky-generators-3.5.2 prototypes/server/shared/spec/integration_spec.rb
picky-generators-3.5.1 prototypes/server/shared/spec/integration_spec.rb
picky-generators-3.5.0 prototypes/server/shared/spec/integration_spec.rb
picky-generators-3.4.3 prototypes/server/shared/spec/integration_spec.rb
picky-generators-3.4.2 prototypes/server/shared/spec/integration_spec.rb
picky-generators-3.4.1 prototypes/server/shared/spec/integration_spec.rb
picky-generators-3.4.0 prototypes/server/shared/spec/integration_spec.rb
picky-generators-3.3.3 prototypes/server/shared/spec/integration_spec.rb
picky-generators-3.3.2 prototypes/server/shared/spec/integration_spec.rb
picky-generators-3.3.1 prototypes/server/shared/spec/integration_spec.rb
picky-generators-3.3.0 prototypes/server/shared/spec/integration_spec.rb
picky-generators-3.2.0 prototypes/server/shared/spec/integration_spec.rb
picky-generators-3.1.13 prototypes/server/shared/spec/integration_spec.rb
picky-generators-3.1.12 prototypes/server/shared/spec/integration_spec.rb
picky-generators-3.1.11 prototypes/server/shared/spec/integration_spec.rb
picky-generators-3.1.10 prototypes/server/shared/spec/integration_spec.rb
picky-generators-3.1.9 prototypes/server/shared/spec/integration_spec.rb
picky-generators-3.1.8 prototypes/server/shared/spec/integration_spec.rb