2019-09-30 05:06:31 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-01-29 20:01:53 -05: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-28 19:08:58 -05:00
|
|
|
expect(subject).to include(:id, :key, :value, :protected, :environment_scope, :variable_type)
|
2018-01-29 20:01:53 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|