Sha256: 971953c4b59b73674fa795e0c5156d3768d25f1a7855f28215efdf7461a08a2e

Contents?: true

Size: 421 Bytes

Versions: 53

Compression:

Stored size: 421 Bytes

Contents

require 'spec_helper'

describe Hydra::ModelMixins::SolrDocumentExtension do
  before do
    @doc = SolrDocument.new(:id=>'changeme:99')
  end

  it "should get_file_asset_count" do

    mock_result = {'response'=>{'numFound'=>0}}
    ActiveFedora::SolrService.should_receive(:query).with("is_part_of_t:\"changeme\\:99\"", :rows=>0, :raw=>true).and_return(mock_result)
    @doc.get_file_asset_count.should == 0
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
hydra-core-5.4.1 spec/lib/solr_document_extension_spec.rb
hydra-core-6.4.2 spec/lib/solr_document_extension_spec.rb
hydra-core-6.4.1 spec/lib/solr_document_extension_spec.rb
hydra-core-6.4.0 spec/lib/solr_document_extension_spec.rb
hydra-core-6.4.0.rc5 spec/lib/solr_document_extension_spec.rb
hydra-core-6.4.0.rc4 spec/lib/solr_document_extension_spec.rb
hydra-core-6.4.0.rc3 spec/lib/solr_document_extension_spec.rb
hydra-core-6.4.0.rc2 spec/lib/solr_document_extension_spec.rb
hydra-core-6.4.0.rc1 spec/lib/solr_document_extension_spec.rb
hydra-core-6.4.0.pre2 spec/lib/solr_document_extension_spec.rb
hydra-core-6.4.0.pre1 spec/lib/solr_document_extension_spec.rb
hydra-core-6.3.4 spec/lib/solr_document_extension_spec.rb
hydra-core-6.3.3 spec/lib/solr_document_extension_spec.rb
hydra-core-6.3.2 spec/lib/solr_document_extension_spec.rb
hydra-core-6.3.1 spec/lib/solr_document_extension_spec.rb
hydra-core-6.3.0 spec/lib/solr_document_extension_spec.rb
hydra-core-6.3.0.rc1 spec/lib/solr_document_extension_spec.rb
hydra-core-6.2.2 spec/lib/solr_document_extension_spec.rb
hydra-core-6.2.1 spec/lib/solr_document_extension_spec.rb
hydra-core-6.2.0 spec/lib/solr_document_extension_spec.rb