Add a test for `service.variables`
Add a test in spec/lib/gitlab/ci/config/entry/service_spec.rb
for #value
for the case where the service has variables
:
Probably something like:
context 'when configuration has variables options' do
let(:config) { { name: 'postgresql:9.5', variables: { POSTGRES_DB: 'test' } } }
describe '#valid?' do
it 'is valid' do
expect(entry).to be_valid
end
end
describe '#value' do
it "returns value" do
expect(entry.value).to eq(
name: 'postgresql:9.5',
variables: [{
key: 'POSTGRES_DB',
value: 'test'
}]
)
end
end
end
Edited by Thong Kuah