summaryrefslogtreecommitdiff
path: root/spec/serializers
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-01-30 02:11:17 +0100
committerMatija Čupić <matteeyah@gmail.com>2018-02-05 18:58:20 +0100
commit04263b9f3be22bd97249162d9d3e27829c639d07 (patch)
tree35ee2f322d2275caba9647ab0f91dabb0c4bf39d /spec/serializers
parent9be519c199b01d4b4b1c69ec4d74a1e99345eb47 (diff)
downloadgitlab-ce-04263b9f3be22bd97249162d9d3e27829c639d07.tar.gz
Add GroupVariableSerializer for Ci::GroupVariable
Diffstat (limited to 'spec/serializers')
-rw-r--r--spec/serializers/group_variable_entity_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/serializers/group_variable_entity_spec.rb b/spec/serializers/group_variable_entity_spec.rb
new file mode 100644
index 00000000000..f6de7d01f98
--- /dev/null
+++ b/spec/serializers/group_variable_entity_spec.rb
@@ -0,0 +1,14 @@
+require 'spec_helper'
+
+describe GroupVariableEntity do
+ 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
+ expect(subject).to include(:id, :key, :value, :protected)
+ end
+ end
+end