diff options
Diffstat (limited to 'spec/serializers/ci/variable_entity_spec.rb')
-rw-r--r-- | spec/serializers/ci/variable_entity_spec.rb | 6 |
1 files changed, 4 insertions, 2 deletions
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 |