Skip to content

Commit

Permalink
Merge pull request #6452 from samvera/abel-fix_content_deposit_event_…
Browse files Browse the repository at this point in the history
…job_spec.rb

Fix content_deposit_event_job_spec.rb
  • Loading branch information
abelemlih authored Nov 17, 2023
2 parents a1fa021 + 49ab4a5 commit 0cbf673
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions spec/jobs/content_deposit_event_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@
RSpec.describe ContentDepositEventJob do
let(:user) { create(:user) }
let(:mock_time) { Time.zone.at(1) }
let(:curation_concern) { create(:work, title: ['MacBeth'], user: user) }
let(:curation_concern) do
if Hyrax.config.use_valkyrie?
valkyrie_create(:monograph, title: ['MacBeth'], depositor: user.user_key)
else
create(:work, title: ['MacBeth'], user: user)
end
end
let(:event) do
path = Hyrax.config.use_valkyrie? ? '/concern/monographs' : '/concern/generic_works'
{
action: "User <a href=\"/users/#{user.to_param}\">#{user.user_key}</a> has deposited <a href=\"/concern/generic_works/#{curation_concern.id}\">MacBeth</a>",
action: "User <a href=\"/users/#{user.to_param}\">#{user.user_key}</a> has deposited <a href=\"#{path}/#{curation_concern.id}\">MacBeth</a>",
timestamp: '1'
}
end
Expand Down

0 comments on commit 0cbf673

Please sign in to comment.