debian-mirror-gitlab/spec/lib/gitlab/config/entry/undefined_spec.rb

50 lines
876 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2016-08-24 12:49:21 +05:30
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe Gitlab::Config::Entry::Undefined do
2016-09-29 09:46:39 +05:30
let(:entry) { described_class.new }
describe '#leaf?' do
it 'is leaf node' do
expect(entry).to be_leaf
end
end
2016-08-24 12:49:21 +05:30
describe '#valid?' do
2016-09-29 09:46:39 +05:30
it 'is always valid' do
expect(entry).to be_valid
2016-08-24 12:49:21 +05:30
end
end
describe '#errors' do
2016-09-29 09:46:39 +05:30
it 'is does not contain errors' do
expect(entry.errors).to be_empty
2016-08-24 12:49:21 +05:30
end
end
describe '#value' do
2016-09-29 09:46:39 +05:30
it 'returns nil' do
expect(entry.value).to eq nil
2016-08-24 12:49:21 +05:30
end
end
2016-09-29 09:46:39 +05:30
describe '#relevant?' do
it 'is not relevant' do
expect(entry.relevant?).to eq false
end
end
2016-09-13 17:45:13 +05:30
2016-09-29 09:46:39 +05:30
describe '#specified?' do
it 'is not defined' do
expect(entry.specified?).to eq false
2016-08-24 12:49:21 +05:30
end
end
2022-01-26 12:08:38 +05:30
describe '#type' do
it 'returns nil' do
expect(entry.type).to eq nil
end
end
2016-08-24 12:49:21 +05:30
end