2016-08-24 12:49:21 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Gitlab::Ci::Config::Node::Undefined do
|
|
|
|
let(:undefined) { described_class.new(entry) }
|
2016-09-13 17:45:13 +05:30
|
|
|
let(:entry) { spy('Entry') }
|
2016-08-24 12:49:21 +05:30
|
|
|
|
|
|
|
describe '#valid?' do
|
2016-09-13 17:45:13 +05:30
|
|
|
it 'delegates method to entry' do
|
|
|
|
expect(undefined.valid).to eq entry
|
2016-08-24 12:49:21 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
describe '#errors' do
|
2016-09-13 17:45:13 +05:30
|
|
|
it 'delegates method to entry' do
|
|
|
|
expect(undefined.errors).to eq entry
|
2016-08-24 12:49:21 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
describe '#value' do
|
2016-09-13 17:45:13 +05:30
|
|
|
it 'delegates method to entry' do
|
|
|
|
expect(undefined.value).to eq entry
|
2016-08-24 12:49:21 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-09-13 17:45:13 +05:30
|
|
|
describe '#specified?' do
|
|
|
|
it 'is always false' do
|
|
|
|
allow(entry).to receive(:specified?).and_return(true)
|
|
|
|
|
|
|
|
expect(undefined.specified?).to be false
|
2016-08-24 12:49:21 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|