Commit 1fbf036a authored by rossfuhrman's avatar rossfuhrman Committed by Robert Speicher

Return Vulnerabilities::Feedback created_at column

This will be used by the frontend to indicate how long ago an action was
taken
parent a5e5470d
......@@ -5,6 +5,7 @@ class Vulnerabilities::FeedbackEntity < Grape::Entity
include GitlabRoutingHelper
expose :id
expose :created_at
expose :project_id
expose :author, using: UserEntity
expose :pipeline, if: -> (feedback, _) { feedback.pipeline.present? } do
......
......@@ -10,6 +10,7 @@
],
"properties" : {
"id": { "type": "integer" },
"created_at": { "type": "date" },
"project_id": { "type": "integer" },
"author": { "$ref": "../../../../../spec/fixtures/api/schemas/entities/user.json" },
"pipeline": {
......
......@@ -10,7 +10,7 @@ describe Vulnerabilities::FeedbackEntity do
describe '#as_json' do
subject { entity.as_json }
it { is_expected.to include(:project_id, :author, :category, :feedback_type) }
it { is_expected.to include(:created_at, :project_id, :author, :category, :feedback_type) }
end
context 'when issue is present' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment