Welcome to mirror list, hosted at ThFree Co, Russian Federation.

initial_pipeline_process_worker_spec.rb « ci « workers « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5db9287fe9683a496cb9c22c931d35cb297222e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Ci::InitialPipelineProcessWorker do
  describe '#perform' do
    let_it_be(:pipeline) { create(:ci_pipeline, :with_job, status: :created) }

    include_examples 'an idempotent worker' do
      let(:job_args) { pipeline.id }

      it 'marks the pipeline as pending' do
        expect(pipeline).to be_created

        subject

        expect(pipeline.reload).to be_pending
      end
    end
  end
end