diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-04-12 18:15:15 +0200 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-04-12 18:15:15 +0200 |
commit | 525ab25ac81a6b81cca56d3cba403ab2a5f372eb (patch) | |
tree | b75bf78592a53a02bc84081011c816a96a4ad379 /spec/workers | |
parent | 3170e5d226ee107409b4345b827519da64ba967e (diff) | |
download | gitlab-ce-525ab25ac81a6b81cca56d3cba403ab2a5f372eb.tar.gz |
Changes suggested by Robert
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/repository_check_worker_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/workers/repository_check_worker_spec.rb b/spec/workers/repository_check_worker_spec.rb index 13493ad2c6a..7a757658e97 100644 --- a/spec/workers/repository_check_worker_spec.rb +++ b/spec/workers/repository_check_worker_spec.rb @@ -4,7 +4,7 @@ describe RepositoryCheckWorker do subject { RepositoryCheckWorker.new } it 'prefers projects that have never been checked' do - projects = 3.times.map { create(:project) } + 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) @@ -12,7 +12,7 @@ describe RepositoryCheckWorker do end it 'sorts projects by last_repository_check_at' do - projects = 3.times.map { create(:project) } + 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) @@ -21,7 +21,7 @@ describe RepositoryCheckWorker do end it 'excludes projects that were checked recently' do - projects = 3.times.map { create(:project) } + 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[2].update_column(:last_repository_check_at, 3.days.ago) |