diff --git a/app/values/manifest_metadata.rb b/app/values/manifest_metadata.rb index 5f7d461c..1fb209e0 100644 --- a/app/values/manifest_metadata.rb +++ b/app/values/manifest_metadata.rb @@ -44,7 +44,8 @@ class Value "Memberof" => "Collections", "Link to catalog" => "View in catalog", "Link to finding aid" => "View in finding aid", - "Electronic locations" => "Available online" + "Electronic locations" => "Available online", + "Edm rights" => "Rights" }.freeze attr_reader :key, :values diff --git a/spec/features/accessibility_spec.rb b/spec/features/accessibility_spec.rb index b084c6e3..4cfbf70c 100644 --- a/spec/features/accessibility_spec.rb +++ b/spec/features/accessibility_spec.rb @@ -54,10 +54,10 @@ readonly_title_tesim: [ title ], - 'exhibit_abc_books_readonly_edm-rights_ssim': [ + 'exhibit_abc_books_readonly_rights_ssim': [ rights ], - 'readonly_edm-rights_tesim': [ + 'readonly_rights_tesim': [ rights ], exhibit_abc_books_readonly_license_ssim: [ @@ -78,7 +78,7 @@ 'readonly_title-sort_ssim': [ title ], - 'readonly_edm-rights_ssim': [ + 'readonly_rights_ssim': [ rights ], readonly_license_ssim: [ @@ -201,10 +201,10 @@ readonly_title_tesim: [ title ], - 'exhibit_abc_books_readonly_edm-rights_ssim': [ + 'exhibit_abc_books_readonly_rights_ssim': [ rights ], - 'readonly_edm-rights_tesim': [ + 'readonly_rights_tesim': [ rights ], exhibit_abc_books_readonly_license_ssim: [ @@ -225,7 +225,7 @@ 'readonly_title-sort_ssim': [ title ], - 'readonly_edm-rights_ssim': [ + 'readonly_rights_ssim': [ rights ], readonly_license_ssim: [ diff --git a/spec/features/browse_spec.rb b/spec/features/browse_spec.rb index 9ed5ca50..9aa8a4e6 100644 --- a/spec/features/browse_spec.rb +++ b/spec/features/browse_spec.rb @@ -14,10 +14,10 @@ readonly_title_tesim: [ title ], - 'exhibit_abc_books_readonly_edm-rights_ssim': [ + 'exhibit_abc_books_readonly_rights_ssim': [ rights ], - 'readonly_edm-rights_tesim': [ + 'readonly_rights_tesim': [ rights ], exhibit_abc_books_readonly_license_ssim: [ @@ -38,7 +38,7 @@ 'readonly_title-sort_ssim': [ title ], - 'readonly_edm-rights_ssim': [ + 'readonly_rights_ssim': [ rights ], readonly_license_ssim: [ @@ -56,10 +56,10 @@ readonly_title_tesim: [ title2 ], - 'exhibit_abc_books_readonly_edm-rights_ssim': [ + 'exhibit_abc_books_readonly_rights_ssim': [ rights ], - 'readonly_edm-rights_tesim': [ + 'readonly_rights_tesim': [ rights ], exhibit_abc_books_readonly_license_ssim: [ @@ -80,7 +80,7 @@ 'readonly_title-sort_ssim': [ title ], - 'readonly_edm-rights_ssim': [ + 'readonly_rights_ssim': [ rights ], readonly_license_ssim: [ @@ -98,10 +98,10 @@ readonly_title_tesim: [ title3 ], - 'exhibit_abc_books_readonly_edm-rights_ssim': [ + 'exhibit_abc_books_readonly_rights_ssim': [ rights ], - 'readonly_edm-rights_tesim': [ + 'readonly_rights_tesim': [ rights ], exhibit_abc_books_readonly_license_ssim: [ @@ -122,7 +122,7 @@ 'readonly_title-sort_ssim': [ title ], - 'readonly_edm-rights_ssim': [ + 'readonly_rights_ssim': [ rights ], readonly_license_ssim: [ diff --git a/spec/features/catalog_spec.rb b/spec/features/catalog_spec.rb index b75bae9d..1d6a1bb2 100644 --- a/spec/features/catalog_spec.rb +++ b/spec/features/catalog_spec.rb @@ -13,10 +13,10 @@ readonly_title_tesim: [ title ], - 'exhibit_abc_books_readonly_edm-rights_ssim': [ + 'exhibit_abc_books_readonly_rights_ssim': [ rights ], - 'readonly_edm-rights_tesim': [ + 'readonly_rights_tesim': [ rights ], exhibit_abc_books_readonly_license_ssim: [ @@ -37,7 +37,7 @@ 'readonly_title-sort_ssim': [ title ], - 'readonly_edm-rights_ssim': [ + 'readonly_rights_ssim': [ rights ], readonly_license_ssim: [ diff --git a/spec/models/spotlight/search_spec.rb b/spec/models/spotlight/search_spec.rb index 7892a946..9241a62a 100644 --- a/spec/models/spotlight/search_spec.rb +++ b/spec/models/spotlight/search_spec.rb @@ -16,10 +16,10 @@ readonly_title_tesim: [ title ], - 'exhibit_abc_books_readonly_edm-rights_ssim': [ + 'exhibit_abc_books_readonly_rights_ssim': [ rights ], - 'readonly_edm-rights_tesim': [ + 'readonly_rights_tesim': [ rights ], exhibit_abc_books_readonly_license_ssim: [ @@ -40,7 +40,7 @@ 'readonly_title-sort_ssim': [ title ], - 'readonly_edm-rights_ssim': [ + 'readonly_rights_ssim': [ rights ], readonly_license_ssim: [ @@ -58,10 +58,10 @@ readonly_title_tesim: [ title2 ], - 'exhibit_abc_books_readonly_edm-rights_ssim': [ + 'exhibit_abc_books_readonly_rights_ssim': [ rights ], - 'readonly_edm-rights_tesim': [ + 'readonly_rights_tesim': [ rights ], exhibit_abc_books_readonly_license_ssim: [ @@ -82,7 +82,7 @@ 'readonly_title-sort_ssim': [ title ], - 'readonly_edm-rights_ssim': [ + 'readonly_rights_ssim': [ rights ], readonly_license_ssim: [ @@ -100,10 +100,10 @@ readonly_title_tesim: [ title3 ], - 'exhibit_abc_books_readonly_edm-rights_ssim': [ + 'exhibit_abc_books_readonly_rights_ssim': [ rights ], - 'readonly_edm-rights_tesim': [ + 'readonly_rights_tesim': [ rights ], exhibit_abc_books_readonly_license_ssim: [ @@ -124,7 +124,7 @@ 'readonly_title-sort_ssim': [ title ], - 'readonly_edm-rights_ssim': [ + 'readonly_rights_ssim': [ rights ], readonly_license_ssim: [ diff --git a/spec/values/manifest_metadata_spec.rb b/spec/values/manifest_metadata_spec.rb index 2cb25095..37e5f2f6 100644 --- a/spec/values/manifest_metadata_spec.rb +++ b/spec/values/manifest_metadata_spec.rb @@ -11,10 +11,11 @@ let(:lang_code) { { "Language" => "en" } } let(:member) { { "Memberof" => { "title" => "Member Title" } } } let(:id_value) { { "Title" => { "@id" => "1234" } } } + let("rights") { { "Edm rights" => "Rights Text" } } let(:date_range_value) do { "date_range" => [ { - "@type" => "edm:TimeSpan", + "@type" => "edm:TimeSpan", # ???? "begin" => ["1992"], "end" => ["1993"], "skos:prefLabel" => "approximately 1992-1993", @@ -52,6 +53,9 @@ it "uses member titles" do expect(metadata.process_values(member)).to eq("Collections" => ["Member Title"]) end + it "calls edm-rights rights" do + expect(metadata.process_values(rights)).to eq("Rights" => ["Rights Text"]) + end it "uses @id as a last resort" do expect(metadata.process_values(id_value)).to eq("Title" => ["1234"]) end diff --git a/spec/views/spotlight/browse/_search_title_html.erb_spec.rb b/spec/views/spotlight/browse/_search_title_html.erb_spec.rb index b794e1a0..6ec7ae48 100644 --- a/spec/views/spotlight/browse/_search_title_html.erb_spec.rb +++ b/spec/views/spotlight/browse/_search_title_html.erb_spec.rb @@ -20,10 +20,10 @@ readonly_title_tesim: [ title ], - 'exhibit_abc_books_readonly_edm-rights_ssim': [ + 'exhibit_abc_books_readonly_rights_ssim': [ rights ], - 'readonly_edm-rights_tesim': [ + 'readonly_rights_tesim': [ rights ], exhibit_abc_books_readonly_license_ssim: [ @@ -44,7 +44,7 @@ 'readonly_title-sort_ssim': [ title ], - 'readonly_edm-rights_ssim': [ + 'readonly_rights_ssim': [ rights ], readonly_license_ssim: [ @@ -62,10 +62,10 @@ readonly_title_tesim: [ title2 ], - 'exhibit_abc_books_readonly_edm-rights_ssim': [ + 'exhibit_abc_books_readonly_rights_ssim': [ rights ], - 'readonly_edm-rights_tesim': [ + 'readonly_rights_tesim': [ rights ], exhibit_abc_books_readonly_license_ssim: [ @@ -86,7 +86,7 @@ 'readonly_title-sort_ssim': [ title ], - 'readonly_edm-rights_ssim': [ + 'readonly_rights_ssim': [ rights ], readonly_license_ssim: [ @@ -104,10 +104,10 @@ readonly_title_tesim: [ title3 ], - 'exhibit_abc_books_readonly_edm-rights_ssim': [ + 'exhibit_abc_books_readonly_rights_ssim': [ rights ], - 'readonly_edm-rights_tesim': [ + 'readonly_rights_tesim': [ rights ], exhibit_abc_books_readonly_license_ssim: [