Use nil for non-existing files rather than 0
This commit is contained in:
parent
9d8dca08e4
commit
7b06acea1c
2 changed files with 4 additions and 2 deletions
|
@ -382,7 +382,9 @@ module Ci
|
|||
private
|
||||
|
||||
def update_artifacts_size
|
||||
self.artifacts_size = artifacts_file.size
|
||||
self.artifacts_size = if artifacts_file.exists?
|
||||
artifacts_file.size
|
||||
end
|
||||
end
|
||||
|
||||
def erase_trace!
|
||||
|
|
|
@ -486,7 +486,7 @@ describe Ci::API::API do
|
|||
expect(response).to have_http_status(200)
|
||||
expect(build.artifacts_file.exists?).to be_falsy
|
||||
expect(build.artifacts_metadata.exists?).to be_falsy
|
||||
expect(build.artifacts_size).to eq(0)
|
||||
expect(build.artifacts_size).to be_nil
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue