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.0.1 spec/lib/solr_document_extension_spec.rb
hydra-core-5.0.0 spec/lib/solr_document_extension_spec.rb
hydra-core-5.0.0.rc1 spec/lib/solr_document_extension_spec.rb
hydra-core-5.0.0.pre15 spec/lib/solr_document_extension_spec.rb
hydra-core-5.0.0.pre14 spec/lib/solr_document_extension_spec.rb
hydra-core-5.0.0.pre13 spec/lib/solr_document_extension_spec.rb
hydra-core-5.0.0.pre12 spec/lib/solr_document_extension_spec.rb
hydra-core-5.0.0.pre11 spec/lib/solr_document_extension_spec.rb
hydra-core-5.0.0.pre10 spec/lib/solr_document_extension_spec.rb
hydra-core-5.0.0.pre9 spec/lib/solr_document_extension_spec.rb
hydra-core-5.0.0.pre8 spec/lib/solr_document_extension_spec.rb
hydra-core-5.0.0.pre7 spec/lib/solr_document_extension_spec.rb
hydra-core-5.0.0.pre6 spec/lib/solr_document_extension_spec.rb