Commit 22262be8 authored by Matija Čupić's avatar Matija Čupić

Expose artifacts #locked? in BuildArtifactEntity

parent 68093563
......@@ -23,6 +23,10 @@ class BuildArtifactEntity < Grape::Entity
fast_browse_project_job_artifacts_path(project, job)
end
expose :locked, if: -> (*) { job.job_artifacts_archive.present? } do |job|
job.job_artifacts_archive.locked?
end
private
alias_method :job, :object
......
......@@ -30,5 +30,9 @@ describe BuildArtifactEntity do
expect(subject[:browse_path])
.to include "jobs/#{job.id}/artifacts/browse"
end
it 'exposes locked information about artifact' do
expect(subject).to include(:locked)
end
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