2019-09-30 09:06:31 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-01-30 01:01:53 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe VariableEntity do
|
|
|
|
let(:variable) { create(:ci_variable) }
|
|
|
|
let(:entity) { described_class.new(variable) }
|
|
|
|
|
|
|
|
describe '#as_json' do
|
|
|
|
subject { entity.as_json }
|
|
|
|
|
|
|
|
it 'contains required fields' do
|
2020-01-29 00:08:58 +00:00
|
|
|
expect(subject).to include(:id, :key, :value, :protected, :environment_scope, :variable_type)
|
2018-01-30 01:01:53 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|