diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-08-02 22:55:11 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-08-03 00:47:31 +0300 |
commit | 72a7b30c9f363063449b28aa9efc3a26a1752f9f (patch) | |
tree | 173a716da52260e57a73c4a6d739fe055898d556 /spec/workers/repository_check | |
parent | e2c3dca371f8dca8814a5924fe8ed271f0ec6399 (diff) |
Change all `:empty_project` to `:project`
Diffstat (limited to 'spec/workers/repository_check')
-rw-r--r-- | spec/workers/repository_check/batch_worker_spec.rb | 10 | ||||
-rw-r--r-- | spec/workers/repository_check/clear_worker_spec.rb | 2 |
2 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 bcd97a4f6ef..850b8cd8f5c 100644 --- a/spec/workers/repository_check/batch_worker_spec.rb +++ b/spec/workers/repository_check/batch_worker_spec.rb @@ -4,7 +4,7 @@ describe RepositoryCheck::BatchWorker do subject { described_class.new } it 'prefers projects that have never been checked' do - projects = create_list(:empty_project, 3, created_at: 1.week.ago) + projects = create_list(:project, 3, created_at: 1.week.ago) projects[0].update_column(:last_repository_check_at, 4.months.ago) projects[2].update_column(:last_repository_check_at, 3.months.ago) @@ -12,7 +12,7 @@ describe RepositoryCheck::BatchWorker do end it 'sorts projects by last_repository_check_at' do - projects = create_list(:empty_project, 3, created_at: 1.week.ago) + projects = create_list(:project, 3, created_at: 1.week.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) @@ -21,7 +21,7 @@ describe RepositoryCheck::BatchWorker do end it 'excludes projects that were checked recently' do - projects = create_list(:empty_project, 3, created_at: 1.week.ago) + projects = create_list(:project, 3, created_at: 1.week.ago) projects[0].update_column(:last_repository_check_at, 2.days.ago) projects[1].update_column(:last_repository_check_at, 2.months.ago) projects[2].update_column(:last_repository_check_at, 3.days.ago) @@ -30,7 +30,7 @@ describe RepositoryCheck::BatchWorker do end it 'does nothing when repository checks are disabled' do - create(:empty_project, created_at: 1.week.ago) + create(:project, created_at: 1.week.ago) current_settings = double('settings', repository_checks_enabled: false) expect(subject).to receive(:current_settings) { current_settings } @@ -38,7 +38,7 @@ describe RepositoryCheck::BatchWorker do end it 'skips projects created less than 24 hours ago' do - project = create(:empty_project) + project = create(:project) project.update_column(:created_at, 23.hours.ago) expect(subject.perform).to eq([]) diff --git a/spec/workers/repository_check/clear_worker_spec.rb b/spec/workers/repository_check/clear_worker_spec.rb index 3b1a64c5057..1c49415d46c 100644 --- a/spec/workers/repository_check/clear_worker_spec.rb +++ b/spec/workers/repository_check/clear_worker_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe RepositoryCheck::ClearWorker do it 'clears repository check columns' do - project = create(:empty_project) + project = create(:project) project.update_columns( last_repository_check_failed: true, last_repository_check_at: Time.now |