Commit 0c02c15c authored by Sean McGivern's avatar Sean McGivern

Merge branch '209990-add-timestamp-to-notes-and-discussions-for-vulnerability' into 'master'

Add last fetched at timestamp on show vulnerability page

See merge request gitlab-org/gitlab!29658
parents 61cdcb8f 29e60d47
......@@ -11,7 +11,8 @@ module VulnerabilitiesHelper
pipeline_json: vulnerability_pipeline_data(pipeline).to_json,
has_mr: !!vulnerability.finding.merge_request_feedback.try(:merge_request_iid),
vulnerability_feedback_help_path: help_page_path('user/application_security/index', anchor: 'interacting-with-the-vulnerabilities'),
finding_json: vulnerability_finding_data(vulnerability.finding).to_json
finding_json: vulnerability_finding_data(vulnerability.finding).to_json,
timestamp: Time.now.to_i
}
end
......
......@@ -49,6 +49,10 @@ describe VulnerabilitiesHelper do
expect(occurrence_serializer_stub).to receive(:represent).with(finding).and_return(occurrence_serializer_hash)
end
around do |example|
Timecop.freeze { example.run }
end
it 'has expected vulnerability properties' do
expect(subject).to include(
vulnerability_json: kind_of(String),
......@@ -56,7 +60,8 @@ describe VulnerabilitiesHelper do
create_issue_url: kind_of(String),
has_mr: anything,
vulnerability_feedback_help_path: kind_of(String),
finding_json: kind_of(String)
finding_json: kind_of(String),
timestamp: Time.now.to_i
)
end
end
......
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