Sha256: c87a8e372a30e2045528f4d491702bb3562f4d0014a96512e854dbceac09c7eb

Contents?: true

Size: 1.03 KB

Versions: 20

Compression:

Stored size: 1.03 KB

Contents

require_relative 'spec_helper'

require 'libis/services/primo/search'
require 'libis-tools'

describe 'Primo search service' do
  let(:subject) { Libis::Services::Primo::Search.new }

  # Disabled as Primo services no longer work as expected
  #
  # context 'query' do
  #
  #   it 'default return result' do
  #     result = subject.query 'foo'
  #     expect(result.keys).to eq [:count, :from, :to, :step, :data]
  #     expect(result[:data].size).to eq [result[:count], result[:step] - 1].min
  #   end
  #
  # end

  # context 'find' do
  #
  #   it 'default return result' do
  #     result = subject.query 'foo'
  #     count = result[:count]
  #     result = subject.find 'foo'
  #     expect(result).to be_a Array
  #     expect(result.size).to eq count
  #   end
  #
  #   it 'limit number of results' do
  #     result = subject.query 'foo', step: 1
  #     count = result[:count] / 2
  #     result = subject.find 'foo', max_count: count
  #     expect(result).to be_a Array
  #     expect(result.size).to eq count
  #   end
  #
  # end

  end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
libis-services-1.1.0 spec/primo_search_spec.rb
libis-services-1.0.13 spec/primo_search_spec.rb
libis-services-1.0.12 spec/primo_search_spec.rb
libis-services-1.0.11 spec/primo_search_spec.rb
libis-services-1.0.10 spec/primo_search_spec.rb
libis-services-1.0.7 spec/primo_search_spec.rb
libis-services-1.0.6 spec/primo_search_spec.rb
libis-services-1.0.5 spec/primo_search_spec.rb
libis-services-1.0.2 spec/primo_search_spec.rb
libis-services-1.0.1 spec/primo_search_spec.rb
libis-services-1.0.0 spec/primo_search_spec.rb
libis-services-0.2.1 spec/primo_search_spec.rb
libis-services-0.2.0 spec/primo_search_spec.rb
libis-services-0.1.18 spec/primo_search_spec.rb
libis-services-0.1.17 spec/primo_search_spec.rb
libis-services-0.1.16 spec/primo_search_spec.rb
libis-services-0.1.15 spec/primo_search_spec.rb
libis-services-0.1.14 spec/primo_search_spec.rb
libis-services-0.1.13 spec/primo_search_spec.rb
libis-services-0.1.12 spec/primo_search_spec.rb