Skip to content

Commit

Permalink
Merge pull request #6753 from samvera/workflow-spec
Browse files Browse the repository at this point in the history
make `default_workflow_spec.rb` order independent
  • Loading branch information
dlpierce authored Mar 28, 2024
2 parents e32c1cf + b661fdd commit 8282378
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion spec/features/default_workflow_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@
let(:attributes) { :LEGACY_UNUSED_ARGUMENT_WITH_NO_KNOWN_USE_CASE_SHOULD_NEVER_BE_REQUIRED }
let(:workflow_factory) { Hyrax::Workflow::WorkflowFactory }

before { Hyrax::EnsureWellFormedAdminSetService.call }
before do
admin_set_id = Hyrax::EnsureWellFormedAdminSetService.call
begin
Sipity::Workflow.find_active_workflow_for(admin_set_id: admin_set_id)
rescue NoActiveWorkflowError => _
Hyrax::Workflow::WorkflowImporter.load_workflows
end
end

it 'sets state to "deposited"' do
workflow_factory.create(work, attributes, depositor)
Expand Down

0 comments on commit 8282378

Please sign in to comment.