diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-01-30 02:01:53 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-02-05 18:58:19 +0100 |
commit | 9be519c199b01d4b4b1c69ec4d74a1e99345eb47 (patch) | |
tree | 117f601dda66d48671a3e83b7ed93f8a00c72805 /spec/serializers | |
parent | b48d8c8ad0bb2874db6b4c9accb3bebd19e9f2c8 (diff) | |
download | gitlab-ce-9be519c199b01d4b4b1c69ec4d74a1e99345eb47.tar.gz |
Add VariableSerializer for Ci::Variable
Diffstat (limited to 'spec/serializers')
-rw-r--r-- | spec/serializers/variable_entity_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/serializers/variable_entity_spec.rb b/spec/serializers/variable_entity_spec.rb new file mode 100644 index 00000000000..effc0022633 --- /dev/null +++ b/spec/serializers/variable_entity_spec.rb @@ -0,0 +1,14 @@ +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 + expect(subject).to include(:id, :key, :value, :protected) + end + end +end |