Sha256: 2e5b8378f89722607c824dab027120374de16f960039bfccceef45b00bfac0b2

Contents?: true

Size: 602 Bytes

Versions: 31

Compression:

Stored size: 602 Bytes

Contents

require 'spec_helper'

describe Blacklight::Solr::Document::MoreLikeThis do
  before(:all) do
    @mock_class = Class.new do
      include Blacklight::Solr::Document
    end
  end
  
  it "should pluck the MoreLikeThis results from the Solr Response" do
    mock_solr_response = double(:more_like => [{'id' => 'abc'}])
    result = @mock_class.new({:id => '123'}, mock_solr_response).more_like_this
    expect(result).to have(1).item
    expect(result.first).to be_a_kind_of(@mock_class)
    expect(result.first.id).to eq 'abc'
    expect(result.first.solr_response).to eq mock_solr_response
  end 
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
blacklight-5.13.0 spec/lib/blacklight/solr/document/more_like_this_spec.rb
blacklight-5.11.3 spec/lib/blacklight/solr/document/more_like_this_spec.rb
blacklight-5.12.1 spec/lib/blacklight/solr/document/more_like_this_spec.rb
blacklight-5.12.0 spec/lib/blacklight/solr/document/more_like_this_spec.rb
blacklight-5.10.3 spec/lib/blacklight/solr/document/more_like_this_spec.rb
blacklight-5.11.2 spec/lib/blacklight/solr/document/more_like_this_spec.rb
blacklight-5.11.1 spec/lib/blacklight/solr/document/more_like_this_spec.rb
blacklight-5.11.0 spec/lib/blacklight/solr/document/more_like_this_spec.rb
blacklight-5.10.2 spec/lib/blacklight/solr/document/more_like_this_spec.rb
blacklight-5.10.1 spec/lib/blacklight/solr/document/more_like_this_spec.rb
blacklight-5.10.0 spec/lib/blacklight/solr/document/more_like_this_spec.rb