aboutsummaryrefslogtreecommitdiffstats
path: root/spec/workers
diff options
context:
space:
mode:
authorRobert2017-10-09 15:43:43 +0200
committerRobert2017-10-09 15:53:45 +0200
commit0ebaac1e338dd50d8cd9a93322a08fae7c503771 (patch)
tree7987e5e2e92c4c209ef87eedb9db7685e65a5110 /spec/workers
parent158c8d1062151cf26461af97e533b6acac09b6d4 (diff)
downloadchouette-core-0ebaac1e338dd50d8cd9a93322a08fae7c503771.tar.bz2
Refs: #4629@1h; Implementing CR + missing worker spec
Diffstat (limited to 'spec/workers')
-rw-r--r--spec/workers/compliance_control_set_copy_worker_spec.rb13
-rw-r--r--spec/workers/line_referential_sync_worker_spec.rb1
2 files changed, 13 insertions, 1 deletions
diff --git a/spec/workers/compliance_control_set_copy_worker_spec.rb b/spec/workers/compliance_control_set_copy_worker_spec.rb
new file mode 100644
index 000000000..3456ad398
--- /dev/null
+++ b/spec/workers/compliance_control_set_copy_worker_spec.rb
@@ -0,0 +1,13 @@
+RSpec.describe ComplianceControlSetCopyWorker do
+ let( :copier ){ ComplianceControlSetCopier }
+
+ let( :compliance_control_set_id ){ double('compliance_control_set_id') }
+ let( :referential_id ){ double('referential_id') }
+
+ before do
+ expect_any_instance_of( copier ).to receive(:copy).with(compliance_control_set_id, referential_id)
+ end
+ it 'delegates to ComplianceControlSetCopier' do
+ described_class.new.perform(compliance_control_set_id, referential_id)
+ end
+end
diff --git a/spec/workers/line_referential_sync_worker_spec.rb b/spec/workers/line_referential_sync_worker_spec.rb
index f1a63c9db..f8d7eed91 100644
--- a/spec/workers/line_referential_sync_worker_spec.rb
+++ b/spec/workers/line_referential_sync_worker_spec.rb
@@ -1,4 +1,3 @@
-require 'rails_helper'
RSpec.describe LineReferentialSyncWorker, type: :worker do
let!(:line_referential_sync) { create :line_referential_sync }