diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-04-13 16:56:05 +0300 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-04-13 16:56:05 +0300 |
commit | 0f602be99f99f1ae493478a8a28df2907cfa0082 (patch) | |
tree | a49a9a7ac70ca6825547db88a32f8b4c00343aa3 /spec/workers | |
parent | 9a30d3b5aef732e782e9496b2e8ae62069ba521a (diff) |
Clear repository check columns asynchronously
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/repository_check/batch_worker_spec.rb (renamed from spec/workers/repository_check_worker_spec.rb) | 4 | ||||
-rw-r--r-- | spec/workers/repository_check/clear_worker_spec.rb | 17 |
2 files changed, 19 insertions, 2 deletions
diff --git a/spec/workers/repository_check_worker_spec.rb b/spec/workers/repository_check/batch_worker_spec.rb index 7a757658e97..51caa645f47 100644 --- a/spec/workers/repository_check_worker_spec.rb +++ b/spec/workers/repository_check/batch_worker_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' -describe RepositoryCheckWorker do - subject { RepositoryCheckWorker.new } +describe RepositoryCheck::BatchWorker do + subject { described_class.new } it 'prefers projects that have never been checked' do projects = create_list(:project, 3) diff --git a/spec/workers/repository_check/clear_worker_spec.rb b/spec/workers/repository_check/clear_worker_spec.rb new file mode 100644 index 00000000000..a3b70c74787 --- /dev/null +++ b/spec/workers/repository_check/clear_worker_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper' + +describe RepositoryCheck::ClearWorker do + it 'clears repository check columns' do + project = create(:empty_project) + project.update_columns( + last_repository_check_failed: true, + last_repository_check_at: Time.now, + ) + + described_class.new.perform + project.reload + + expect(project.last_repository_check_failed).to be_nil + expect(project.last_repository_check_at).to be_nil + end +end |