diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 14:22:11 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 14:22:11 +0000 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /spec/serializers/ci | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) | |
download | gitlab-ce-0c872e02b2c822e3397515ec324051ff540f0cd5.tar.gz |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'spec/serializers/ci')
-rw-r--r-- | spec/serializers/ci/group_variable_entity_spec.rb | 6 | ||||
-rw-r--r-- | spec/serializers/ci/variable_entity_spec.rb | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/spec/serializers/ci/group_variable_entity_spec.rb b/spec/serializers/ci/group_variable_entity_spec.rb index 9b64e263992..42c4e940421 100644 --- a/spec/serializers/ci/group_variable_entity_spec.rb +++ b/spec/serializers/ci/group_variable_entity_spec.rb @@ -3,14 +3,16 @@ require 'spec_helper' RSpec.describe Ci::GroupVariableEntity do - let(:variable) { create(:ci_group_variable) } + let(:variable) { build(:ci_group_variable) } let(:entity) { described_class.new(variable) } describe '#as_json' do subject { entity.as_json } it 'contains required fields' do - expect(subject).to include(:id, :key, :value, :protected, :variable_type, :environment_scope) + expect(subject.keys).to contain_exactly( + :id, :key, :value, :protected, :variable_type, :environment_scope, :raw, :masked + ) end end end diff --git a/spec/serializers/ci/variable_entity_spec.rb b/spec/serializers/ci/variable_entity_spec.rb index 38da0b16bbd..96111604028 100644 --- a/spec/serializers/ci/variable_entity_spec.rb +++ b/spec/serializers/ci/variable_entity_spec.rb @@ -3,14 +3,16 @@ require 'spec_helper' RSpec.describe Ci::VariableEntity do - let(:variable) { create(:ci_variable) } + let(:variable) { build(:ci_variable) } let(:entity) { described_class.new(variable) } describe '#as_json' do subject { entity.as_json } it 'contains required fields' do - expect(subject).to include(:id, :key, :value, :protected, :environment_scope, :variable_type) + expect(subject.keys).to contain_exactly( + :id, :key, :value, :protected, :environment_scope, :variable_type, :raw, :masked + ) end end end |