Sha256: 0119f0419c640f82e3593e40612d78528faa00b287d0c8738ae32ec3f20c6302
Contents?: true
Size: 581 Bytes
Versions: 27
Compression:
Stored size: 581 Bytes
Contents
# frozen_string_literal: true RSpec.describe Blacklight::SuggestSearch, api: true do let(:params) { { q: 'test' } } let(:response) { instance_double(Blacklight::Suggest::Response) } let(:repository) { instance_double(Blacklight::Solr::Repository, suggestions: response) } let(:suggest_search) { described_class.new(params, repository) } describe '#suggestions' do it 'delegates to the repository' do expect(repository).to receive(:suggestions).with({ q: 'test' }).and_return(response) expect(suggest_search.suggestions).to eq response end end end
Version data entries
27 entries across 27 versions & 2 rubygems