2016-06-07 05:58:02 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2018-11-29 06:44:48 -05:00
|
|
|
describe Gitlab::Config::Entry::Undefined do
|
2016-08-06 11:12:59 -04:00
|
|
|
let(:entry) { described_class.new }
|
|
|
|
|
|
|
|
describe '#leaf?' do
|
|
|
|
it 'is leaf node' do
|
|
|
|
expect(entry).to be_leaf
|
|
|
|
end
|
|
|
|
end
|
2016-06-07 05:58:02 -04:00
|
|
|
|
2016-07-12 08:10:18 -04:00
|
|
|
describe '#valid?' do
|
2016-08-06 11:12:59 -04:00
|
|
|
it 'is always valid' do
|
|
|
|
expect(entry).to be_valid
|
2016-06-07 05:58:02 -04:00
|
|
|
end
|
|
|
|
end
|
2016-06-08 06:32:56 -04:00
|
|
|
|
2016-07-12 08:10:18 -04:00
|
|
|
describe '#errors' do
|
2016-08-06 11:12:59 -04:00
|
|
|
it 'is does not contain errors' do
|
|
|
|
expect(entry.errors).to be_empty
|
2016-06-22 08:26:33 -04:00
|
|
|
end
|
2016-07-12 08:10:18 -04:00
|
|
|
end
|
2016-06-22 08:26:33 -04:00
|
|
|
|
2016-07-12 08:10:18 -04:00
|
|
|
describe '#value' do
|
2016-08-06 11:12:59 -04:00
|
|
|
it 'returns nil' do
|
|
|
|
expect(entry.value).to eq nil
|
2016-06-08 06:32:56 -04:00
|
|
|
end
|
|
|
|
end
|
2016-06-23 07:51:07 -04:00
|
|
|
|
2016-08-06 11:12:59 -04:00
|
|
|
describe '#relevant?' do
|
|
|
|
it 'is not relevant' do
|
|
|
|
expect(entry.relevant?).to eq false
|
|
|
|
end
|
|
|
|
end
|
2016-07-12 08:10:18 -04:00
|
|
|
|
2016-08-06 11:12:59 -04:00
|
|
|
describe '#specified?' do
|
|
|
|
it 'is not defined' do
|
|
|
|
expect(entry.specified?).to eq false
|
2016-06-23 07:51:07 -04:00
|
|
|
end
|
|
|
|
end
|
2016-06-07 05:58:02 -04:00
|
|
|
end
|