2019-07-25 01:21:37 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-08-06 11:12:59 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 14:09:03 -04:00
|
|
|
RSpec.describe Gitlab::Config::Entry::Unspecified do
|
2016-08-06 11:12:59 -04:00
|
|
|
let(:unspecified) { described_class.new(entry) }
|
|
|
|
let(:entry) { spy('Entry') }
|
|
|
|
|
|
|
|
describe '#valid?' do
|
|
|
|
it 'delegates method to entry' do
|
|
|
|
expect(unspecified.valid?).to eq entry
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
describe '#errors' do
|
|
|
|
it 'delegates method to entry' do
|
|
|
|
expect(unspecified.errors).to eq entry
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
describe '#value' do
|
|
|
|
it 'delegates method to entry' do
|
|
|
|
expect(unspecified.value).to eq entry
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
describe '#specified?' do
|
|
|
|
it 'is always false' do
|
|
|
|
allow(entry).to receive(:specified?).and_return(true)
|
|
|
|
|
|
|
|
expect(unspecified.specified?).to be false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|