Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-03-11 00:08:21 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-11 00:08:21 +0300
commite43574ee831197b604c59b80f94e30764223e5ed (patch)
treef467f4c23cd9d151b5d54711451252de94d62879 /spec/lib/gitlab/config
parentd18b7dc5eea84db5008986c6879a24ad7f6462a6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/config')
-rw-r--r--spec/lib/gitlab/config/entry/validators_spec.rb43
1 files changed, 0 insertions, 43 deletions
diff --git a/spec/lib/gitlab/config/entry/validators_spec.rb b/spec/lib/gitlab/config/entry/validators_spec.rb
deleted file mode 100644
index cbc09aac586..00000000000
--- a/spec/lib/gitlab/config/entry/validators_spec.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe Gitlab::Config::Entry::Validators do
- let(:klass) do
- Class.new do
- include ActiveModel::Validations
- include Gitlab::Config::Entry::Validators
- end
- end
-
- let(:instance) { klass.new }
-
- describe described_class::MutuallyExclusiveKeysValidator do
- using RSpec::Parameterized::TableSyntax
-
- before do
- klass.instance_eval do
- validates :config, mutually_exclusive_keys: [:foo, :bar]
- end
-
- allow(instance).to receive(:config).and_return(config)
- end
-
- where(:context, :config, :valid_result) do
- 'with mutually exclusive keys' | { foo: 1, bar: 2 } | false
- 'without mutually exclusive keys' | { foo: 1 } | true
- 'without mutually exclusive keys' | { bar: 1 } | true
- 'with other keys' | { foo: 1, baz: 2 } | true
- end
-
- with_them do
- it 'validates the instance' do
- expect(instance.valid?).to be(valid_result)
-
- unless valid_result
- expect(instance.errors.messages_for(:config)).to include /please use only one the following keys: foo, bar/
- end
- end
- end
- end
-end