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: 5fb8671fd5c3a12f01c22e491978692d5c89399e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Ci::InitialPipelineProcessWorker do
  describe '#perform' do
    let_it_be_with_reload(:pipeline) do
      create(:ci_pipeline, :with_job, status: :created)
    end

    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