Commit e729c20a authored by Robert Speicher's avatar Robert Speicher

Merge branch '9715-return-dismissal-timestamp' into 'master'

Return Vulnerabilities::Feedback created_at column

See merge request gitlab-org/gitlab-ee!11015
parents a5e5470d 1fbf036a
...@@ -5,6 +5,7 @@ class Vulnerabilities::FeedbackEntity < Grape::Entity ...@@ -5,6 +5,7 @@ class Vulnerabilities::FeedbackEntity < Grape::Entity
include GitlabRoutingHelper include GitlabRoutingHelper
expose :id expose :id
expose :created_at
expose :project_id expose :project_id
expose :author, using: UserEntity expose :author, using: UserEntity
expose :pipeline, if: -> (feedback, _) { feedback.pipeline.present? } do expose :pipeline, if: -> (feedback, _) { feedback.pipeline.present? } do
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
], ],
"properties" : { "properties" : {
"id": { "type": "integer" }, "id": { "type": "integer" },
"created_at": { "type": "date" },
"project_id": { "type": "integer" }, "project_id": { "type": "integer" },
"author": { "$ref": "../../../../../spec/fixtures/api/schemas/entities/user.json" }, "author": { "$ref": "../../../../../spec/fixtures/api/schemas/entities/user.json" },
"pipeline": { "pipeline": {
......
...@@ -10,7 +10,7 @@ describe Vulnerabilities::FeedbackEntity do ...@@ -10,7 +10,7 @@ describe Vulnerabilities::FeedbackEntity do
describe '#as_json' do describe '#as_json' do
subject { entity.as_json } 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 end
context 'when issue is present' do 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