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

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

require 'fast_spec_helper'

RSpec.describe Gitlab::Ci::Input::Arguments::Base, feature_category: :pipeline_composition do
  subject do
    Class.new(described_class) do
      def validate!; end
      def to_value; end
    end
  end

  it 'fabricates an invalid input argument if unknown value is provided' do
    argument = subject.new(:something, { spec: 123 }, [:a, :b])

    expect(argument).not_to be_valid
    expect(argument.errors.first).to eq 'unsupported value in input argument `something`'
  end
end