BigW Consortium Gitlab

undefined_spec.rb 747 Bytes
Newer Older
1 2
require 'spec_helper'

3
describe Gitlab::Ci::Config::Entry::Undefined do
4 5 6 7 8 9 10
  let(:entry) { described_class.new }

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

12
  describe '#valid?' do
13 14
    it 'is always valid' do
      expect(entry).to be_valid
15 16
    end
  end
17

18
  describe '#errors' do
19 20
    it 'is does not contain errors' do
      expect(entry.errors).to be_empty
21
    end
22
  end
23

24
  describe '#value' do
25 26
    it 'returns nil' do
      expect(entry.value).to eq nil
27 28
    end
  end
29

30 31 32 33 34
  describe '#relevant?' do
    it 'is not relevant' do
      expect(entry.relevant?).to eq false
    end
  end
35

36 37 38
  describe '#specified?' do
    it 'is not defined' do
      expect(entry.specified?).to eq false
39 40
    end
  end
41
end