expose additional values in deploy key entity

This commit is contained in:
Jarka Kadlecova 2017-04-07 13:34:39 +02:00
parent e0dc73527a
commit 703df2881b
2 changed files with 4 additions and 0 deletions

View File

@ -4,6 +4,8 @@ class DeployKeyEntity < Grape::Entity
expose :title
expose :fingerprint
expose :can_push
expose :destroyed_when_orphaned?, as: :destroyed_when_orphaned
expose :almost_orphaned?, as: :almost_orphaned
expose :created_at
expose :updated_at
expose :projects, using: ProjectEntity do |deploy_key|

View File

@ -17,6 +17,8 @@ describe DeployKeyEntity do
title: deploy_key.title,
fingerprint: deploy_key.fingerprint,
can_push: deploy_key.can_push,
destroyed_when_orphaned: true,
almost_orphaned: false,
created_at: deploy_key.created_at,
updated_at: deploy_key.updated_at,
projects: [