summaryrefslogtreecommitdiff
path: root/spec/serializers
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-09-05 11:30:16 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2017-10-04 22:46:49 +0200
commitd33e15574b064e38ceadf8aafb47af985d1a7a7a (patch)
tree0852a044ceef545d7cdc5b17ee0ab70cee1f3e63 /spec/serializers
parent376a8c66c1ca8ee2a95255d21c9d55ce006ab655 (diff)
downloadgitlab-ce-d33e15574b064e38ceadf8aafb47af985d1a7a7a.tar.gz
Add serializer for group children
Diffstat (limited to 'spec/serializers')
-rw-r--r--spec/serializers/group_child_entity_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/serializers/group_child_entity_spec.rb b/spec/serializers/group_child_entity_spec.rb
new file mode 100644
index 00000000000..1c4cdc2a5fb
--- /dev/null
+++ b/spec/serializers/group_child_entity_spec.rb
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe GroupChildEntity do
+ let(:request) { double('request') }
+ let(:entity) { described_class.new(object, request: request) }
+ subject(:json) { entity.as_json }
+
+ describe 'for a project' do
+ let(:object) { build_stubbed(:project) }
+
+ it 'has the correct type' do
+ expect(json[:type]).to eq('project')
+ end
+ end
+end