2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-10-11 01:57:18 +05:30
|
|
|
require 'fast_spec_helper'
|
2016-09-29 09:46:39 +05:30
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
RSpec.describe Gitlab::Config::Entry::Unspecified do
|
2016-09-29 09:46:39 +05:30
|
|
|
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
|