debian-mirror-gitlab/spec/lib/gitlab/ci/config/node/undefined_spec.rb

42 lines
746 B
Ruby
Raw Normal View History

2016-08-24 12:49:21 +05:30
require 'spec_helper'
describe Gitlab::Ci::Config::Node::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
end