summaryrefslogtreecommitdiff
path: root/spec/workers
diff options
context:
space:
mode:
Diffstat (limited to 'spec/workers')
-rw-r--r--spec/workers/build_coverage_worker_spec.rb8
-rw-r--r--spec/workers/build_finished_worker_spec.rb20
-rw-r--r--spec/workers/build_hooks_worker_spec.rb8
-rw-r--r--spec/workers/build_success_worker_spec.rb12
-rw-r--r--spec/workers/pipeline_hooks_worker_spec.rb8
-rw-r--r--spec/workers/pipeline_proccess_worker_spec.rb4
-rw-r--r--spec/workers/pipeline_success_worker_spec.rb4
-rw-r--r--spec/workers/pipeline_update_worker_spec.rb4
-rw-r--r--spec/workers/project_cache_worker_spec.rb12
-rw-r--r--spec/workers/use_key_worker_spec.rb4
10 files changed, 42 insertions, 42 deletions
diff --git a/spec/workers/build_coverage_worker_spec.rb b/spec/workers/build_coverage_worker_spec.rb
index ba20488f663..8ebf00374a1 100644
--- a/spec/workers/build_coverage_worker_spec.rb
+++ b/spec/workers/build_coverage_worker_spec.rb
@@ -6,8 +6,8 @@ describe BuildCoverageWorker do
let!(:build) { create(:ci_build) }
it 'updates code coverage' do
- expect_any_instance_of(Ci::Build)
- .to receive(:update_coverage)
+ expect_any_instance_of(Ci::Build).
+ to receive(:update_coverage)
described_class.new.perform(build.id)
end
@@ -15,8 +15,8 @@ describe BuildCoverageWorker do
context 'when build does not exist' do
it 'does not raise exception' do
- expect { described_class.new.perform(123) }
- .not_to raise_error
+ expect { described_class.new.perform(123) }.
+ not_to raise_error
end
end
end
diff --git a/spec/workers/build_finished_worker_spec.rb b/spec/workers/build_finished_worker_spec.rb
index 2868167c7d4..f8119913116 100644
--- a/spec/workers/build_finished_worker_spec.rb
+++ b/spec/workers/build_finished_worker_spec.rb
@@ -6,15 +6,15 @@ describe BuildFinishedWorker do
let(:build) { create(:ci_build) }
it 'calculates coverage and calls hooks' do
- expect(BuildCoverageWorker)
- .to receive(:new).ordered.and_call_original
- expect(BuildHooksWorker)
- .to receive(:new).ordered.and_call_original
+ expect(BuildCoverageWorker).
+ to receive(:new).ordered.and_call_original
+ expect(BuildHooksWorker).
+ to receive(:new).ordered.and_call_original
- expect_any_instance_of(BuildCoverageWorker)
- .to receive(:perform)
- expect_any_instance_of(BuildHooksWorker)
- .to receive(:perform)
+ expect_any_instance_of(BuildCoverageWorker).
+ to receive(:perform)
+ expect_any_instance_of(BuildHooksWorker).
+ to receive(:perform)
described_class.new.perform(build.id)
end
@@ -22,8 +22,8 @@ describe BuildFinishedWorker do
context 'when build does not exist' do
it 'does not raise exception' do
- expect { described_class.new.perform(123) }
- .not_to raise_error
+ expect { described_class.new.perform(123) }.
+ not_to raise_error
end
end
end
diff --git a/spec/workers/build_hooks_worker_spec.rb b/spec/workers/build_hooks_worker_spec.rb
index 97654a93f5c..51abc1d89a1 100644
--- a/spec/workers/build_hooks_worker_spec.rb
+++ b/spec/workers/build_hooks_worker_spec.rb
@@ -6,8 +6,8 @@ describe BuildHooksWorker do
let!(:build) { create(:ci_build) }
it 'calls build hooks' do
- expect_any_instance_of(Ci::Build)
- .to receive(:execute_hooks)
+ expect_any_instance_of(Ci::Build).
+ to receive(:execute_hooks)
described_class.new.perform(build.id)
end
@@ -15,8 +15,8 @@ describe BuildHooksWorker do
context 'when build does not exist' do
it 'does not raise exception' do
- expect { described_class.new.perform(123) }
- .not_to raise_error
+ expect { described_class.new.perform(123) }.
+ not_to raise_error
end
end
end
diff --git a/spec/workers/build_success_worker_spec.rb b/spec/workers/build_success_worker_spec.rb
index dba70883130..d016ecbb738 100644
--- a/spec/workers/build_success_worker_spec.rb
+++ b/spec/workers/build_success_worker_spec.rb
@@ -7,8 +7,8 @@ describe BuildSuccessWorker do
let!(:build) { create(:ci_build, environment: 'production') }
it 'executes deployment service' do
- expect_any_instance_of(CreateDeploymentService)
- .to receive(:execute)
+ expect_any_instance_of(CreateDeploymentService).
+ to receive(:execute)
described_class.new.perform(build.id)
end
@@ -18,8 +18,8 @@ describe BuildSuccessWorker do
let!(:build) { create(:ci_build, project: nil) }
it 'does not create deployment' do
- expect_any_instance_of(CreateDeploymentService)
- .not_to receive(:execute)
+ expect_any_instance_of(CreateDeploymentService).
+ not_to receive(:execute)
described_class.new.perform(build.id)
end
@@ -28,8 +28,8 @@ describe BuildSuccessWorker do
context 'when build does not exist' do
it 'does not raise exception' do
- expect { described_class.new.perform(123) }
- .not_to raise_error
+ expect { described_class.new.perform(123) }.
+ not_to raise_error
end
end
end
diff --git a/spec/workers/pipeline_hooks_worker_spec.rb b/spec/workers/pipeline_hooks_worker_spec.rb
index 035e329839f..061f4bda36c 100644
--- a/spec/workers/pipeline_hooks_worker_spec.rb
+++ b/spec/workers/pipeline_hooks_worker_spec.rb
@@ -6,8 +6,8 @@ describe PipelineHooksWorker do
let(:pipeline) { create(:ci_pipeline) }
it 'executes hooks for the pipeline' do
- expect_any_instance_of(Ci::Pipeline)
- .to receive(:execute_hooks)
+ expect_any_instance_of(Ci::Pipeline).
+ to receive(:execute_hooks)
described_class.new.perform(pipeline.id)
end
@@ -15,8 +15,8 @@ describe PipelineHooksWorker do
context 'when pipeline does not exist' do
it 'does not raise exception' do
- expect { described_class.new.perform(123) }
- .not_to raise_error
+ expect { described_class.new.perform(123) }.
+ not_to raise_error
end
end
end
diff --git a/spec/workers/pipeline_proccess_worker_spec.rb b/spec/workers/pipeline_proccess_worker_spec.rb
index 86e9d7f6684..fd6ee0714ea 100644
--- a/spec/workers/pipeline_proccess_worker_spec.rb
+++ b/spec/workers/pipeline_proccess_worker_spec.rb
@@ -14,8 +14,8 @@ describe PipelineProcessWorker do
context 'when pipeline does not exist' do
it 'does not raise exception' do
- expect { described_class.new.perform(123) }
- .not_to raise_error
+ expect { described_class.new.perform(123) }.
+ not_to raise_error
end
end
end
diff --git a/spec/workers/pipeline_success_worker_spec.rb b/spec/workers/pipeline_success_worker_spec.rb
index d1c84adda6f..f6c56465feb 100644
--- a/spec/workers/pipeline_success_worker_spec.rb
+++ b/spec/workers/pipeline_success_worker_spec.rb
@@ -16,8 +16,8 @@ describe PipelineSuccessWorker do
context 'when pipeline does not exist' do
it 'does not raise exception' do
- expect { described_class.new.perform(123) }
- .not_to raise_error
+ expect { described_class.new.perform(123) }.
+ not_to raise_error
end
end
end
diff --git a/spec/workers/pipeline_update_worker_spec.rb b/spec/workers/pipeline_update_worker_spec.rb
index 0b456cfd0da..24d78aae112 100644
--- a/spec/workers/pipeline_update_worker_spec.rb
+++ b/spec/workers/pipeline_update_worker_spec.rb
@@ -14,8 +14,8 @@ describe PipelineUpdateWorker do
context 'when pipeline does not exist' do
it 'does not raise exception' do
- expect { described_class.new.perform(123) }
- .not_to raise_error
+ expect { described_class.new.perform(123) }.
+ not_to raise_error
end
end
end
diff --git a/spec/workers/project_cache_worker_spec.rb b/spec/workers/project_cache_worker_spec.rb
index f4f63b57a5f..0fc274f1a01 100644
--- a/spec/workers/project_cache_worker_spec.rb
+++ b/spec/workers/project_cache_worker_spec.rb
@@ -31,9 +31,9 @@ describe ProjectCacheWorker do
context 'with an existing project' do
it 'updates the project statistics' do
- expect(worker).to receive(:update_statistics)
- .with(kind_of(Project), %i(repository_size))
- .and_call_original
+ expect(worker).to receive(:update_statistics).
+ with(kind_of(Project), %i(repository_size)).
+ and_call_original
worker.perform(project.id, [], %w(repository_size))
end
@@ -67,9 +67,9 @@ describe ProjectCacheWorker do
with(project.id, :update_statistics).
and_return(true)
- expect(statistics).to receive(:refresh!)
- .with(only: %i(repository_size))
- .and_call_original
+ expect(statistics).to receive(:refresh!).
+ with(only: %i(repository_size)).
+ and_call_original
worker.update_statistics(project, %i(repository_size))
end
diff --git a/spec/workers/use_key_worker_spec.rb b/spec/workers/use_key_worker_spec.rb
index e50c788b82a..f8752c42a49 100644
--- a/spec/workers/use_key_worker_spec.rb
+++ b/spec/workers/use_key_worker_spec.rb
@@ -8,8 +8,8 @@ describe UseKeyWorker do
current_time = Time.zone.now
Timecop.freeze(current_time) do
- expect { worker.perform(key.id) }
- .to change { key.reload.last_used_at }.from(nil).to be_like_time(current_time)
+ expect { worker.perform(key.id) }.
+ to change { key.reload.last_used_at }.from(nil).to be_like_time(current_time)
end
end