Sha256: 943274e3b5fd834c6264d4153a9f74963b04ecc17503b662accc2f91e483db8d

Contents?: true

Size: 906 Bytes

Versions: 14

Compression:

Stored size: 906 Bytes

Contents

require 'spec_helper'

describe Solrizer::XML::Extractor do
  
  before(:all) do
    @extractor = Solrizer::Extractor.new
  end
  
  describe ".xml_to_solr" do
    it "should turn simple xml into a solr document" do
      desc_meta = fixture("druid-bv448hq0314-descMetadata.xml")

      result = @extractor.xml_to_solr(desc_meta)
      result[:type_t].should == "text"
      result[:medium_t].should == "Paper Document"
      result[:rights_t].should == "Presumed under copyright. Do not publish."
      result[:date_t].should == "1985-12-30"
      result[:format_t].should be_kind_of(Array)
      result[:format_t].should include("application/tiff")
      result[:format_t].should include("application/pdf")
      result[:format_t].should include("application/jp2000")
      result[:title_t].should == "This is a Sample Title"
      result[:publisher_t].should == "Sample Unversity"

    end
  end
  
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
solrizer-2.2.0 spec/units/xml_extractor_spec.rb
solrizer-2.1.0 spec/units/xml_extractor_spec.rb
solrizer-2.1.0.rc1 spec/units/xml_extractor_spec.rb
solrizer-2.0.0 spec/units/xml_extractor_spec.rb
solrizer-2.0.0.rc7 spec/units/xml_extractor_spec.rb
solrizer-2.0.0.rc6 spec/units/xml_extractor_spec.rb
solrizer-2.0.0.rc5 spec/units/xml_extractor_spec.rb
solrizer-2.0.0.rc4 spec/units/xml_extractor_spec.rb
solrizer-2.0.0.rc3 spec/units/xml_extractor_spec.rb
solrizer-2.0.0.rc2 spec/units/xml_extractor_spec.rb
solrizer-2.0.0.rc1 spec/units/xml_extractor_spec.rb
solrizer-1.2.2 spec/units/xml_extractor_spec.rb
solrizer-1.2.1 spec/units/xml_extractor_spec.rb
solrizer-1.2.0 spec/units/xml_extractor_spec.rb