Sha256: e5578389c1287d74d7e7ad6610cc9ba8a4b10a25291a98382504f509cc7dd775
Contents?: true
Size: 1.34 KB
Versions: 6
Compression:
Stored size: 1.34 KB
Contents
require 'spec_helper' module Ddr::IngestTools::DdrRdrMigrator RSpec.describe LicenseMapper do subject { described_class.new(manifest: manifest) } let(:headers) do %w[ pid model title license ] end let(:ddr_data) do [ %w[ test:1 Collection a https://creativecommons.org/licenses/by-nc/4.0/ ], %w[ test:2 Item aa https://creativecommons.org/publicdomain/zero/1.0/ ], %w[ test:3 Item ba https://creativecommons.org/licenses/by/4.0/ ] ] end let(:rdr_data) do [ %w[ test:1 Collection a https://creativecommons.org/licenses/by-nc/4.0/ ], %w[ test:2 Item aa http://creativecommons.org/publicdomain/zero/1.0/ ], %w[ test:3 Item ba https://creativecommons.org/licenses/by/4.0/ ] ] end let(:manifest) do CSV::Table.new([ CSV::Row.new(headers, ddr_data[0]), CSV::Row.new(headers, ddr_data[1]), CSV::Row.new(headers, ddr_data[2]) ]) end let(:expected_manifest) do CSV::Table.new([ CSV::Row.new(headers, rdr_data[0]), CSV::Row.new(headers, rdr_data[1]), CSV::Row.new(headers, rdr_data[2]) ]) end it 'overwrites the appropriate manifest cells' do expect(subject.call).to eq(expected_manifest) end end end
Version data entries
6 entries across 6 versions & 1 rubygems