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

prefix_spec.rb « entry « config « ci « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8132a674488a07d1e50ff1afb9e8dce291b15697 (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
28
# frozen_string_literal: true

require 'spec_helper'

describe Gitlab::Ci::Config::Entry::Prefix do
  let(:entry) { described_class.new(config) }

  describe 'validations' do
    it_behaves_like 'key entry validations', :prefix

    context 'when entry value is not correct' do
      let(:config) { ['incorrect'] }

      describe '#errors' do
        it 'saves errors' do
          expect(entry.errors)
            .to include 'prefix config should be a string or symbol'
        end
      end
    end
  end

  describe '.default' do
    it 'returns default key' do
      expect(described_class.default).to be_nil
    end
  end
end