diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-19 17:16:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-19 17:16:28 +0300 |
commit | e4384360a16dd9a19d4d2d25d0ef1f2b862ed2a6 (patch) | |
tree | 2fcdfa7dcdb9db8f5208b2562f4b4e803d671243 /spec/models/ci/variable_spec.rb | |
parent | ffda4e7bcac36987f936b4ba515995a6698698f0 (diff) |
Add latest changes from gitlab-org/gitlab@16-2-stable-eev16.2.0-rc42
Diffstat (limited to 'spec/models/ci/variable_spec.rb')
-rw-r--r-- | spec/models/ci/variable_spec.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/models/ci/variable_spec.rb b/spec/models/ci/variable_spec.rb index 85327dbeb34..c93f355718a 100644 --- a/spec/models/ci/variable_spec.rb +++ b/spec/models/ci/variable_spec.rb @@ -15,13 +15,16 @@ RSpec.describe Ci::Variable, feature_category: :secrets_management do it { is_expected.to include_module(Ci::Maskable) } it { is_expected.to include_module(HasEnvironmentScope) } it { is_expected.to validate_uniqueness_of(:key).scoped_to(:project_id, :environment_scope).with_message(/\(\w+\) has already been taken/) } + it { is_expected.to allow_values('').for(:description) } + it { is_expected.to allow_values(nil).for(:description) } + it { is_expected.to validate_length_of(:description).is_at_most(255) } end describe '.by_environment_scope' do let!(:matching_variable) { create(:ci_variable, environment_scope: 'production ') } let!(:non_matching_variable) { create(:ci_variable, environment_scope: 'staging') } - subject { Ci::Variable.by_environment_scope('production') } + subject { described_class.by_environment_scope('production') } it { is_expected.to contain_exactly(matching_variable) } end |