diff options
| author | Robert | 2017-10-17 10:50:41 +0200 | 
|---|---|---|
| committer | Robert | 2017-10-17 12:19:59 +0200 | 
| commit | bacb624a9d0415337dfab6418de240cd2afa7305 (patch) | |
| tree | 71c1c0b98963f92935425666ee0c097c27816416 /spec/workers | |
| parent | 8fffc6dd27175b20cc18c246a10151bc98bba4ee (diff) | |
| download | chouette-core-bacb624a9d0415337dfab6418de240cd2afa7305.tar.bz2 | |
Fixes: #4727@0.5h; Worker speced and implemented
Diffstat (limited to 'spec/workers')
| -rw-r--r-- | spec/workers/clean_up_worker_spec.rb | 1 | ||||
| -rw-r--r-- | spec/workers/compliance_control_set_cloning_worker_spec.rb | 14 | 
2 files changed, 14 insertions, 1 deletions
| diff --git a/spec/workers/clean_up_worker_spec.rb b/spec/workers/clean_up_worker_spec.rb index e85768fa3..fd767db00 100644 --- a/spec/workers/clean_up_worker_spec.rb +++ b/spec/workers/clean_up_worker_spec.rb @@ -1,4 +1,3 @@ -require 'rails_helper'  RSpec.describe CleanUpWorker, type: :worker do      pending "add some examples to (or delete) #{__FILE__}"  end diff --git a/spec/workers/compliance_control_set_cloning_worker_spec.rb b/spec/workers/compliance_control_set_cloning_worker_spec.rb new file mode 100644 index 000000000..dee3e6dd5 --- /dev/null +++ b/spec/workers/compliance_control_set_cloning_worker_spec.rb @@ -0,0 +1,14 @@ +RSpec.describe ComplianceControlSetCloningWorker do + + +  it 'is a worker' do +    expect( described_class.new ).to be_a(Sidekiq::Worker) +  end + +  it 'delegates perform to the correct lib call' do +    id = random_int +    expect_any_instance_of(ComplianceControlSetCloner).to receive(:copy).with(id)  +    described_class.new.perform(id) +  end +   +end | 
