debian-mirror-gitlab/spec/lib/gitlab/ci/config/entry/prefix_spec.rb

29 lines
639 B
Ruby
Raw Normal View History

2019-12-26 22:10:19 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe Gitlab::Ci::Config::Entry::Prefix do
2019-12-26 22:10:19 +05:30
let(:entry) { described_class.new(config) }
describe 'validations' do
it_behaves_like 'key entry validations', :prefix
context 'when entry value is not correct' do
let(:config) { ['incorrect'] }
describe '#errors' do
it 'saves errors' do
expect(entry.errors)
.to include 'prefix config should be a string or symbol'
end
end
end
end
describe '.default' do
it 'returns default key' do
expect(described_class.default).to be_nil
end
end
end