summaryrefslogtreecommitdiff
path: root/app/serializers
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-11-04 13:08:58 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-11-04 13:08:58 +0100
commit3968b07d7ea1fd2ca07e427a487ea94ca0c6081d (patch)
treefedd5455aab03f821ae44373a994b2bf06f12d9c /app/serializers
parentc315332b8a90d26197ad93a6e982888aa575e2d4 (diff)
downloadgitlab-ce-3968b07d7ea1fd2ca07e427a487ea94ca0c6081d.tar.gz
Add tests for serialization entities, add user entity
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/commit_entity.rb2
-rw-r--r--app/serializers/deployment_entity.rb2
-rw-r--r--app/serializers/user_entity.rb2
3 files changed, 4 insertions, 2 deletions
diff --git a/app/serializers/commit_entity.rb b/app/serializers/commit_entity.rb
index 3b6c2323e3e..827782e85bb 100644
--- a/app/serializers/commit_entity.rb
+++ b/app/serializers/commit_entity.rb
@@ -1,7 +1,7 @@
class CommitEntity < API::Entities::RepoCommit
include RequestAwareEntity
- expose :author, using: API::Entities::UserBasic
+ expose :author, using: UserEntity
expose :commit_url do |commit|
@urls.namespace_project_tree_url(
diff --git a/app/serializers/deployment_entity.rb b/app/serializers/deployment_entity.rb
index d3ed6a5eef4..d743b44c4a0 100644
--- a/app/serializers/deployment_entity.rb
+++ b/app/serializers/deployment_entity.rb
@@ -20,7 +20,7 @@ class DeploymentEntity < Grape::Entity
expose :tag
expose :last?
- expose :user, using: API::Entities::UserBasic
+ expose :user, using: UserEntity
expose :commit, using: CommitEntity
expose :deployable, using: BuildEntity
expose :manual_actions, using: BuildEntity
diff --git a/app/serializers/user_entity.rb b/app/serializers/user_entity.rb
new file mode 100644
index 00000000000..43754ea94f7
--- /dev/null
+++ b/app/serializers/user_entity.rb
@@ -0,0 +1,2 @@
+class UserEntity < API::Entities::UserBasic
+end