Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-09-05 12:30:16 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2017-10-04 23:46:49 +0300
commitd33e15574b064e38ceadf8aafb47af985d1a7a7a (patch)
tree0852a044ceef545d7cdc5b17ee0ab70cee1f3e63 /spec/serializers/group_child_entity_spec.rb
parent376a8c66c1ca8ee2a95255d21c9d55ce006ab655 (diff)
Add serializer for group children
Diffstat (limited to 'spec/serializers/group_child_entity_spec.rb')
-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