diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index 906712054..16c28f1b0 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -291,6 +291,7 @@ class CatalogController < ApplicationController config.add_show_field 'homoit_genre_s', label: 'Homosaurus genre(s)', helper_method: :subjectify config.add_show_field 'rbgenr_s', label: 'Rare books genre', helper_method: :subjectify config.add_show_field 'aat_s', label: 'Getty AAT genre', helper_method: :subjectify + config.add_show_field 'fast_subject_display', label: 'FaST Subject(s)' config.add_show_field 'related_works_1display', label: 'Related work(s)', helper_method: :name_title_hierarchy config.add_show_field 'series_display', label: 'Series', series_link: true config.add_show_field 'contains_1display', label: 'Contains', helper_method: :name_title_hierarchy diff --git a/spec/fixtures/alma/current_fixtures.json b/spec/fixtures/alma/current_fixtures.json index 6c9fd0a50..23844ed74 100644 --- a/spec/fixtures/alma/current_fixtures.json +++ b/spec/fixtures/alma/current_fixtures.json @@ -30984,6 +30984,10 @@ "Periodicals", "LGBTQ+ periodicals" ], + "fast_subject_display": [ + "Criticism, interpretation, etc.", + "Another uncontrolled subject" + ], "homoit_genre_s": [ "LGBTQ+ periodicals" ], diff --git a/spec/views/catalog/show.html.erb_spec.rb b/spec/views/catalog/show.html.erb_spec.rb index 380709ad8..43ce96286 100644 --- a/spec/views/catalog/show.html.erb_spec.rb +++ b/spec/views/catalog/show.html.erb_spec.rb @@ -120,6 +120,14 @@ end end + context 'when a document has FaST subject headings' do + it 'displays the subject headings' do + visit 'catalog/99125527882306421' + expect(page).to have_content('FaST Subject(s)') + expect(page).to have_content('Criticism, interpretation, etc.') + end + end + context 'when a document has no language_iana_s' do it 'defaults to lang attribute "en"' do visit 'catalog/99124945733506421'