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:
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