diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-04-12 18:07:54 +0300 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-04-12 18:07:54 +0300 |
commit | 97f4ffff1e7b5da94e18edc20c009ffb46784187 (patch) | |
tree | 5d49026f25bfacb529dafc9142250681f4263cfb /spec/workers | |
parent | b37d3b9423991763ad03fca791a1daf473dafed1 (diff) |
Add a 'circuit breaker' for repo checks
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/repository_check_worker_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/workers/repository_check_worker_spec.rb b/spec/workers/repository_check_worker_spec.rb index d1849321f56..13493ad2c6a 100644 --- a/spec/workers/repository_check_worker_spec.rb +++ b/spec/workers/repository_check_worker_spec.rb @@ -28,4 +28,12 @@ describe RepositoryCheckWorker do expect(subject.perform).to eq([projects[1].id]) end + + it 'does nothing when repository checks are disabled' do + create(:empty_project) + current_settings = double('settings', repository_checks_enabled: false) + expect(subject).to receive(:current_settings) { current_settings } + + expect(subject.perform).to eq(nil) + end end |