Move JobArtifactEntity to JobArtifactReportEntity
This commit is contained in:
parent
31bd09a392
commit
9e6f37744a
|
@ -42,7 +42,7 @@ class BuildDetailsEntity < JobEntity
|
|||
end
|
||||
end
|
||||
|
||||
expose :reports, if: -> (*) { can?(current_user, :read_build, build) }, using: JobArtifactEntity do |build|
|
||||
expose :reports, if: -> (*) { can?(current_user, :read_build, build) }, using: JobArtifactReportEntity do |build|
|
||||
build.job_artifacts.merge(Ci::JobArtifact.with_all_reports)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class JobArtifactEntity < Grape::Entity
|
||||
class JobArtifactReportEntity < Grape::Entity
|
||||
include RequestAwareEntity
|
||||
|
||||
expose :file_type
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'spec_helper'
|
||||
|
||||
describe JobArtifactEntity do
|
||||
describe JobArtifactReportEntity do
|
||||
let(:report) { create(:ci_job_artifact, :codequality) }
|
||||
let(:entity) { described_class.new(report, request: double) }
|
||||
|
Loading…
Reference in New Issue