aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/workers/referential_destroy_worker_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/workers/referential_destroy_worker_spec.rb b/spec/workers/referential_destroy_worker_spec.rb
new file mode 100644
index 000000000..b24d72fd3
--- /dev/null
+++ b/spec/workers/referential_destroy_worker_spec.rb
@@ -0,0 +1,8 @@
+require 'rails_helper'
+RSpec.describe ReferentialDestroyWorker, type: :worker do
+ let!(:referential) { create :referential }
+
+ it 'should destroy referential on worker perform' do
+ expect{ReferentialDestroyWorker.new.perform(referential.id)}.to change(Referential, :count).by(-1)
+ end
+end