Sha256: d8d847b9d924e9cfa450417e297f836a087b799ee83fe57cd4b63bcd6d242804

Contents?: true

Size: 651 Bytes

Versions: 39

Compression:

Stored size: 651 Bytes

Contents

require 'spec_helper'

describe Krikri::Enrichments::MoveNonDcmiType do
  it_behaves_like 'a generic enrichment'

  it 'returns strings as found' do
    string = 'moomin'
    expect(subject.enrich_value(string)).to eq string
  end

  it 'returns typed data as found' do
    date = Date.today
    expect(subject.enrich_value(date)).to eq date
  end

  it 'returns Resources as found' do
    resource = ActiveTriples::Resource.new
    expect(subject.enrich_value(resource)).to eq resource
  end

  it 'returns nil for DCMI Type values' do
    resource = DPLA::MAP::Controlled::DCMIType.new
    expect(subject.enrich_value(resource)).to be_nil
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
krikri-0.15.2 spec/lib/krikri/enrichments/move_non_dcmi_type_spec.rb
krikri-0.15.1 spec/lib/krikri/enrichments/move_non_dcmi_type_spec.rb
krikri-0.15.0 spec/lib/krikri/enrichments/move_non_dcmi_type_spec.rb
krikri-0.14.0 spec/lib/krikri/enrichments/move_non_dcmi_type_spec.rb
krikri-0.13.2 spec/lib/krikri/enrichments/move_non_dcmi_type_spec.rb
krikri-0.13.1 spec/lib/krikri/enrichments/move_non_dcmi_type_spec.rb
krikri-0.13.0 spec/lib/krikri/enrichments/move_non_dcmi_type_spec.rb
krikri-0.12.4 spec/lib/krikri/enrichments/move_non_dcmi_type_spec.rb
krikri-0.12.3 spec/lib/krikri/enrichments/move_non_dcmi_type_spec.rb
krikri-0.12.1 spec/lib/krikri/enrichments/move_non_dcmi_type_spec.rb
krikri-0.12.0 spec/lib/krikri/enrichments/move_non_dcmi_type_spec.rb
krikri-0.12.0.pre.rc.1 spec/lib/krikri/enrichments/move_non_dcmi_type_spec.rb
krikri-0.11.2 spec/lib/krikri/enrichments/move_non_dcmi_type_spec.rb
krikri-0.11.1 spec/lib/krikri/enrichments/move_non_dcmi_type_spec.rb
krikri-0.11.0 spec/lib/krikri/enrichments/move_non_dcmi_type_spec.rb
krikri-0.10.1 spec/lib/krikri/enrichments/move_non_dcmi_type_spec.rb
krikri-0.10.0 spec/lib/krikri/enrichments/move_non_dcmi_type_spec.rb
krikri-0.9.0 spec/lib/krikri/enrichments/move_non_dcmi_type_spec.rb
krikri-0.8.9 spec/lib/krikri/enrichments/move_non_dcmi_type_spec.rb
krikri-0.8.8 spec/lib/krikri/enrichments/move_non_dcmi_type_spec.rb