Sha256: 4df0f5588d433f49b7244e005cb369142f59659339fe669486ace31af7ff529f

Contents?: true

Size: 1.71 KB

Versions: 6

Compression:

Stored size: 1.71 KB

Contents

require 'spec_helper'

RSpec.describe GeoCombine::Iso19139 do
  include XmlDocs
  let(:iso_object){ GeoCombine::Iso19139.new(stanford_iso) }
  describe '#initialize' do
    it 'returns an instantiated Iso19139 object' do
      expect(iso_object).to be_an GeoCombine::Iso19139
    end
  end
  describe '#xsl_geoblacklight' do
    it 'should be defined' do
      expect(iso_object.xsl_geoblacklight).to be_an Nokogiri::XSLT::Stylesheet
    end
  end
  describe '#xsl_html' do
    it 'should be defined' do
      expect(iso_object.xsl_geoblacklight).to be_an Nokogiri::XSLT::Stylesheet
    end
  end
  describe '#to_geoblacklight' do
    let(:valid_geoblacklight) { iso_object.to_geoblacklight('layer_geom_type_s' => 'Polygon') }
    it 'should create a GeoCombine::Geoblacklight object' do
      expect(valid_geoblacklight).to be_an GeoCombine::Geoblacklight
    end
    it 'is valid GeoBlacklight-Schema' do
      valid_geoblacklight.enhance_metadata
      expect(valid_geoblacklight.valid?).to be_truthy
    end
    it 'should have geoblacklight_version' do
      expect(valid_geoblacklight.metadata['geoblacklight_version']).to eq '1.0'
    end
    it 'should have dc_creator_sm' do
      expect(valid_geoblacklight.metadata["dc_creator_sm"]).to be_an Array
      expect(valid_geoblacklight.metadata["dc_creator_sm"]).to eq ["Circuit Rider Productions"]
    end
    it 'should have dc_publisher_sm' do
      expect(valid_geoblacklight.metadata["dc_publisher_sm"]).to be_an Array
      expect(valid_geoblacklight.metadata["dc_publisher_sm"]).to eq ["Circuit Rider Productions"]
    end
  end
  describe '#to_html' do
    it 'should create a transformation of the metadata as a String' do
      expect(iso_object.to_html).to be_an String
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
geo_combine-0.5.1 spec/lib/geo_combine/iso19139_spec.rb
geo_combine-0.5.0 spec/lib/geo_combine/iso19139_spec.rb
geo_combine-0.4.0 spec/lib/geo_combine/iso19139_spec.rb
geo_combine-0.3.1 spec/lib/geo_combine/iso19139_spec.rb
geo_combine-0.3.0 spec/lib/geo_combine/iso19139_spec.rb
geo_combine-0.2.0 spec/lib/geo_combine/iso19139_spec.rb