diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-04-13 18:33:25 +0300 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-04-13 18:33:25 +0300 |
commit | 6f6d2d0ad5039fa8ace7e09c4f5867bb680b0f79 (patch) | |
tree | e8419624393e8224e2e55f006685a84a27afa021 /spec/workers/repository_check | |
parent | bf31b4495e020ef5fa45b204d2494d8d3b4d1494 (diff) |
Use more conservative limits
Diffstat (limited to 'spec/workers/repository_check')
-rw-r--r-- | spec/workers/repository_check/batch_worker_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/workers/repository_check/batch_worker_spec.rb b/spec/workers/repository_check/batch_worker_spec.rb index 51caa645f47..f486e45ddad 100644 --- a/spec/workers/repository_check/batch_worker_spec.rb +++ b/spec/workers/repository_check/batch_worker_spec.rb @@ -5,17 +5,17 @@ describe RepositoryCheck::BatchWorker do it 'prefers projects that have never been checked' do projects = create_list(:project, 3) - projects[0].update_column(:last_repository_check_at, 1.month.ago) - projects[2].update_column(:last_repository_check_at, 3.weeks.ago) + projects[0].update_column(:last_repository_check_at, 4.months.ago) + projects[2].update_column(:last_repository_check_at, 3.months.ago) expect(subject.perform).to eq(projects.values_at(1, 0, 2).map(&:id)) end it 'sorts projects by last_repository_check_at' do projects = create_list(:project, 3) - projects[0].update_column(:last_repository_check_at, 2.weeks.ago) - projects[1].update_column(:last_repository_check_at, 1.month.ago) - projects[2].update_column(:last_repository_check_at, 3.weeks.ago) + projects[0].update_column(:last_repository_check_at, 2.months.ago) + projects[1].update_column(:last_repository_check_at, 4.months.ago) + projects[2].update_column(:last_repository_check_at, 3.months.ago) expect(subject.perform).to eq(projects.values_at(1, 2, 0).map(&:id)) end @@ -23,7 +23,7 @@ describe RepositoryCheck::BatchWorker do it 'excludes projects that were checked recently' do projects = create_list(:project, 3) projects[0].update_column(:last_repository_check_at, 2.days.ago) - projects[1].update_column(:last_repository_check_at, 1.month.ago) + projects[1].update_column(:last_repository_check_at, 2.months.ago) projects[2].update_column(:last_repository_check_at, 3.days.ago) expect(subject.perform).to eq([projects[1].id]) |