Sha256: 62ad0312b6b8e7ad2f5448766486e335e2f2aaad69cc19675b6da78572897b6a
Contents?: true
Size: 658 Bytes
Versions: 13
Compression:
Stored size: 658 Bytes
Contents
require 'spec_helper' describe ActiveFedora::SolrHit do before do class Foo < ActiveFedora::Base property :title, predicate: ::RDF::Vocab::DC.title, multiple: false end end after do Object.send(:remove_const, :Foo) end let(:another) { Foo.create } let!(:obj) { Foo.create!( id: 'test-123', title: 'My Title' ) } let(:doc) { obj.to_solr } subject(:solr_hit) { described_class.new(doc) } describe "#reify" do let(:solr_reified) { solr_hit.reify } it "finds the document in solr" do expect(solr_reified).to be_instance_of Foo expect(solr_reified.title).to eq 'My Title' end end end
Version data entries
13 entries across 13 versions & 1 rubygems