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

undefined_spec.rb « entry « config « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 31e0f9487aabb410cdd8543190b3fd03895c3822 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Gitlab::Config::Entry::Undefined do
  let(:entry) { described_class.new }

  describe '#leaf?' do
    it 'is leaf node' do
      expect(entry).to be_leaf
    end
  end

  describe '#valid?' do
    it 'is always valid' do
      expect(entry).to be_valid
    end
  end

  describe '#errors' do
    it 'is does not contain errors' do
      expect(entry.errors).to be_empty
    end
  end

  describe '#value' do
    it 'returns nil' do
      expect(entry.value).to eq nil
    end
  end

  describe '#relevant?' do
    it 'is not relevant' do
      expect(entry.relevant?).to eq false
    end
  end

  describe '#specified?' do
    it 'is not defined' do
      expect(entry.specified?).to eq false
    end
  end

  describe '#type' do
    it 'returns nil' do
      expect(entry.type).to eq nil
    end
  end
end