spec/config/hyrax_events_spec.rb in hyrax-1.1.1 vs spec/config/hyrax_events_spec.rb in hyrax-2.0.0.beta1

- old
+ new

@@ -1,6 +1,6 @@ -describe "hyrax_events using Hyrax callbacks" do +RSpec.describe "hyrax_events using Hyrax callbacks" do let(:curation_concern) { create(:work) } let(:file_set) { create(:file_set) } let(:user) { create(:user) } describe "after_create_concern" do @@ -17,31 +17,26 @@ end end describe "after_revert_content" do let(:revision) { "revision1" } + it "queues a ContentRestoredVersionEventJob" do expect(ContentRestoredVersionEventJob).to receive(:perform_later).with(file_set, user, revision) Hyrax.config.callback.run(:after_revert_content, file_set, user, revision) end end - describe "after_update_content" do - it "queues a ContentNewVersionEventJob" do - expect(ContentNewVersionEventJob).to receive(:perform_later).with(file_set, user) - Hyrax.config.callback.run(:after_update_content, file_set, user) - end - end - describe "after_update_metadata" do it "queues a ContentUpdateEventJob" do expect(ContentUpdateEventJob).to receive(:perform_later).with(curation_concern, user) Hyrax.config.callback.run(:after_update_metadata, curation_concern, user) end end describe "after_destroy" do let(:id) { curation_concern.id } + it "queues a ContentDeleteEventJob" do expect(ContentDeleteEventJob).to receive(:perform_later).with(id, user) Hyrax.config.callback.run(:after_destroy, id, user) end end