From 4319562bc015e8898114431f182d0ac437ffc2e6 Mon Sep 17 00:00:00 2001 From: Jeremy Friesen Date: Wed, 20 Dec 2023 13:40:52 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Bring=20over=20Hyrax=20spec=20ch?= =?UTF-8?q?anges?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collections/_form_share_table.html.erb_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/views/hyrax/dashboard/collections/_form_share_table.html.erb_spec.rb b/spec/views/hyrax/dashboard/collections/_form_share_table.html.erb_spec.rb index 7ac61018b..a5cc18839 100644 --- a/spec/views/hyrax/dashboard/collections/_form_share_table.html.erb_spec.rb +++ b/spec/views/hyrax/dashboard/collections/_form_share_table.html.erb_spec.rb @@ -4,7 +4,8 @@ let(:template) { stub_model(Hyrax::PermissionTemplate) } let(:user) { create(:user) } let(:access_grant) { nil } - let(:collection) { stub_model(Collection, share_applies_to_new_works?: false) } + let(:collection) { stub_model(Collection) } + let(:collection_type) { stub_model(Hyrax::CollectionType, share_applies_to_new_works?: false) } let(:pt_form) do instance_double(Hyrax::Forms::PermissionTemplateForm, model_name: template.model_name, @@ -14,14 +15,13 @@ before do assign(:collection, collection) + assign(:collection_type, collection_type) @form = instance_double(Hyrax::Forms::CollectionForm, to_model: stub_model(Collection), permission_template: pt_form, filter_access_grants_by_access: [access_grant]) # Ignore the delete button link - # allow(view).to receive( - # :admin_permission_template_access_path - # ).and_return("/admin/permission_template_accesses/123") + allow(view.hyrax).to receive(:admin_permission_template_access_path).and_return("/admin/permission_template_accesses/123") end describe "Manager shares table" do