From 6c779977fa1d2746b6c7e5e85b1e45e621ca43be Mon Sep 17 00:00:00 2001 From: tamsin johnson Date: Mon, 30 Oct 2023 15:55:58 -0700 Subject: [PATCH] use valkyrie factories to setup WorkflowListener specs --- spec/services/hyrax/listeners/workflow_listener_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/services/hyrax/listeners/workflow_listener_spec.rb b/spec/services/hyrax/listeners/workflow_listener_spec.rb index 0669b547ee..ba37c7eaf1 100644 --- a/spec/services/hyrax/listeners/workflow_listener_spec.rb +++ b/spec/services/hyrax/listeners/workflow_listener_spec.rb @@ -7,7 +7,7 @@ let(:resource) { FactoryBot.valkyrie_create(:hyrax_work) } let(:user) { FactoryBot.create(:user) } - let(:admin_set) { FactoryBot.create(:admin_set, with_permission_template: true) } + let(:admin_set) { FactoryBot.valkyrie_create(:hyrax_admin_set, with_permission_template: true) } let(:permission_template) { Hyrax::PermissionTemplate.find_by!(source_id: admin_set.id.to_s) } shared_examples 'logs a sipity error' do @@ -55,7 +55,7 @@ context 'with an admin_set_id, but no permission template' do let(:resource) { FactoryBot.valkyrie_create(:hyrax_work, admin_set_id: admin_set.id) } - let(:admin_set) { FactoryBot.create(:admin_set) } + let(:admin_set) { FactoryBot.valkyrie_create(:hyrax_admin_set) } it_behaves_like 'logs a sipity error' end