Sha256: c3f51ffd423230b89d185917a13ba769f008bfecfd4bd86904957950c134304b
Contents?: true
Size: 737 Bytes
Versions: 5
Compression:
Stored size: 737 Bytes
Contents
require 'spec_helper' describe Geoblacklight::SolrDocument::Finder do let(:subject) { Geoblacklight::SolrDocument } describe '#find' do it 'calls index and returns first document' do documents = %w(first second) response = double('response') index = double('index') expect(response).to receive(:documents).and_return(documents) expect(index).to receive(:find).with('search param').and_return(response) expect(subject).to receive(:index).and_return(index) expect(subject.find('search param')).to eq 'first' end end describe '#index' do it 'creates and returns a Blacklight::SolrRepository' do expect(subject.index).to be_an Blacklight::SolrRepository end end end
Version data entries
5 entries across 5 versions & 1 rubygems