Sha256: a76b85214446ed5ac13fb1eec1e0c1c4023ec4e7b4dd01e14753e7cb19f00a62
Contents?: true
Size: 556 Bytes
Versions: 9
Compression:
Stored size: 556 Bytes
Contents
# frozen_string_literal: true describe Blacklight::SuggestSearch 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
9 entries across 9 versions & 1 rubygems