diff options
author | James Lopez <james@jameslopez.es> | 2016-06-16 12:59:07 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-06-16 12:59:07 +0200 |
commit | 452c076a34cc11cc97f4b1c3113e86ce4367e055 (patch) | |
tree | a503b33dc6dd181e2cf56d5965fc1eb822b4d9f9 /spec/workers/stuck_ci_builds_worker_spec.rb | |
parent | 13e37a3ee5c943525a99481b855d654e97e8597c (diff) | |
download | gitlab-ce-452c076a34cc11cc97f4b1c3113e86ce4367e055.tar.gz |
Revert "squashed merge and fixed conflicts"
This reverts commit 13e37a3ee5c943525a99481b855d654e97e8597c.
Diffstat (limited to 'spec/workers/stuck_ci_builds_worker_spec.rb')
-rw-r--r-- | spec/workers/stuck_ci_builds_worker_spec.rb | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/spec/workers/stuck_ci_builds_worker_spec.rb b/spec/workers/stuck_ci_builds_worker_spec.rb index 801fa31b45d..665ec20f224 100644 --- a/spec/workers/stuck_ci_builds_worker_spec.rb +++ b/spec/workers/stuck_ci_builds_worker_spec.rb @@ -2,7 +2,6 @@ require "spec_helper" describe StuckCiBuildsWorker do let!(:build) { create :ci_build } - let(:worker) { described_class.new } subject do build.reload @@ -17,13 +16,13 @@ describe StuckCiBuildsWorker do it 'gets dropped if it was updated over 2 days ago' do build.update!(updated_at: 2.days.ago) - worker.perform + StuckCiBuildsWorker.new.perform is_expected.to eq('failed') end it "is still #{status}" do build.update!(updated_at: 1.minute.ago) - worker.perform + StuckCiBuildsWorker.new.perform is_expected.to eq(status) end end @@ -37,21 +36,9 @@ describe StuckCiBuildsWorker do it "is still #{status}" do build.update!(updated_at: 2.days.ago) - worker.perform + StuckCiBuildsWorker.new.perform is_expected.to eq(status) end end end - - context "for deleted project" do - before do - build.update!(status: :running, updated_at: 2.days.ago) - build.project.update(pending_delete: true) - end - - it "does not drop build" do - expect_any_instance_of(Ci::Build).not_to receive(:drop) - worker.perform - end - end end |