2019-09-30 05:06:31 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-01-29 20:11:17 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-07-13 17:09:24 -04:00
|
|
|
RSpec.describe Ci::GroupVariableEntity do
|
2018-01-29 20:11:17 -05:00
|
|
|
let(:variable) { create(:ci_group_variable) }
|
|
|
|
let(:entity) { described_class.new(variable) }
|
|
|
|
|
|
|
|
describe '#as_json' do
|
|
|
|
subject { entity.as_json }
|
|
|
|
|
|
|
|
it 'contains required fields' do
|
2020-03-13 11:09:21 -04:00
|
|
|
expect(subject).to include(:id, :key, :value, :protected, :variable_type)
|
2018-01-29 20:11:17 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|