From c650acaf59cab77ba0815eeb041cd2e46bdb1312 Mon Sep 17 00:00:00 2001 From: bwatson78 Date: Wed, 8 Jun 2022 15:38:56 -0400 Subject: [PATCH] Eliminates duplicate Collection relation. --- app/presenters/hyrax/work_show_presenter.rb | 2 +- spec/features/work_show_spec.rb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/presenters/hyrax/work_show_presenter.rb b/app/presenters/hyrax/work_show_presenter.rb index f300736863..e0860a47fc 100644 --- a/app/presenters/hyrax/work_show_presenter.rb +++ b/app/presenters/hyrax/work_show_presenter.rb @@ -147,7 +147,7 @@ def tweeter end def presenter_types - Hyrax.config.registered_curation_concern_types.map(&:underscore) + ["collection"] + Hyrax.config.registered_curation_concern_types.map(&:underscore) + ["collection", "Collection"] end # @return [Array] presenters grouped by model name, used to show the parents of this object diff --git a/spec/features/work_show_spec.rb b/spec/features/work_show_spec.rb index 79d607fe1c..fdeb4ad305 100644 --- a/spec/features/work_show_spec.rb +++ b/spec/features/work_show_spec.rb @@ -132,6 +132,9 @@ expect(page).to have_content collection.title.first expect(page).to have_content work.title.first expect(page).to have_selector '.alert-success', text: 'Collection was successfully updated.' + + visit work_path + expect(page).to have_selector 'a', text: collection.title.first, count: 1 end end