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

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

RSpec.shared_examples 'manual playable stage' do |stage_type|
  let(:stage) { build(stage_type, status: status) }

  describe '#manual_playable?' do
    subject { stage.manual_playable? }

    context 'when is manual' do
      let(:status) { 'manual' }

      it { is_expected.to be_truthy }
    end

    context 'when is scheduled' do
      let(:status) { 'scheduled' }

      it { is_expected.to be_truthy }
    end

    context 'when is skipped' do
      let(:status) { 'skipped' }

      it { is_expected.to be_falsy }
    end
  end
end