File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -755,7 +755,10 @@ class DestroyTest < ActiveSupport::TestCase
755755 ActiveMerchant ::Billing ::BogusGateway . any_instance . expects ( :unstore ) . never
756756
757757 ::Sidekiq ::Testing . inline! do
758- provider . destroy!
758+ # Prevent exception when deserializing ProviderDomainsChangedEvent with a non-existing (destroyed) provider
759+ suppress ( ActiveJob ::DeserializationError ) do
760+ provider . destroy!
761+ end
759762 end
760763
761764 # TODO: master should not be emailed about events related to schduled_for_deletion providers
@@ -768,7 +771,10 @@ class DestroyTest < ActiveSupport::TestCase
768771 provider . schedule_for_deletion!
769772
770773 ::Sidekiq ::Testing . inline! do
771- provider . destroy!
774+ # Prevent exception when deserializing ProviderDomainsChangedEvent with a non-existing (destroyed) provider
775+ suppress ( ActiveJob ::DeserializationError ) do
776+ provider . destroy!
777+ end
772778 end
773779
774780 # TODO: master should not be notified about deleted scheduled for deletion providers for any reason
@@ -781,7 +787,10 @@ class DestroyTest < ActiveSupport::TestCase
781787 provider . schedule_for_deletion!
782788
783789 ::Sidekiq ::Testing . inline! do
784- provider . destroy!
790+ # Prevent exception when deserializing ProviderDomainsChangedEvent with a non-existing (destroyed) provider
791+ suppress ( ActiveJob ::DeserializationError ) do
792+ provider . destroy!
793+ end
785794 end
786795
787796 # TODO: master should not be notified about deleted scheduled for deletion providers for any reason
You can’t perform that action at this time.
0 commit comments