diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-19 23:18:09 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-19 23:18:09 +0000 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/lib/gitlab/ci/config/entry/rules/rule_spec.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) | |
download | gitlab-ce-6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde.tar.gz |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/lib/gitlab/ci/config/entry/rules/rule_spec.rb')
-rw-r--r-- | spec/lib/gitlab/ci/config/entry/rules/rule_spec.rb | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/spec/lib/gitlab/ci/config/entry/rules/rule_spec.rb b/spec/lib/gitlab/ci/config/entry/rules/rule_spec.rb index c85fe366da6..303d825c591 100644 --- a/spec/lib/gitlab/ci/config/entry/rules/rule_spec.rb +++ b/spec/lib/gitlab/ci/config/entry/rules/rule_spec.rb @@ -1,8 +1,7 @@ # frozen_string_literal: true -require 'fast_spec_helper' +require 'spec_helper' require 'gitlab_chronic_duration' -require_dependency 'active_model' RSpec.describe Gitlab::Ci::Config::Entry::Rules::Rule do let(:factory) do @@ -363,7 +362,20 @@ RSpec.describe Gitlab::Ci::Config::Entry::Rules::Rule do it { is_expected.not_to be_valid } it 'returns an error about invalid variables:' do - expect(subject.errors).to include(/variables config should be a hash of key value pairs/) + expect(subject.errors).to include(/variables config should be a hash/) + end + + context 'when the FF ci_variables_refactoring_to_variable is disabled' do + let(:entry_without_ff) { factory.create! } + + before do + stub_feature_flags(ci_variables_refactoring_to_variable: false) + entry_without_ff.compose! + end + + it 'returns an error about invalid variables:' do + expect(subject.errors).to include(/variables config should be a hash/) + end end end end |