Sha256: 4e8ae1ec7b43c6e77110554b7bec022eed8b38d7cc85dd16676544f98ad9c558

Contents?: true

Size: 536 Bytes

Versions: 3

Compression:

Stored size: 536 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe SolrDocument do
  describe "#to_model" do

    before do
      class SolrDocumentWithHydraOverride < SolrDocument
         include Hydra::Solr::Document
      end
    end
    # this isn't a great test, but...
    it "should try to cast the SolrDocument to the Fedora object" do
      ActiveFedora::Base.expects(:load_instance_from_solr).with('asdfg', kind_of(SolrDocument))
      SolrDocumentWithHydraOverride.new(:id => 'asdfg').to_model
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hydra-head-4.1.3 test_support/spec/models/solr_document_spec.rb
hydra-head-4.1.2 test_support/spec/models/solr_document_spec.rb
hydra-head-4.1.1 test_support/spec/models/solr_document_spec.rb