Use nil for non-existing files rather than 0
This commit is contained in:
parent
9d8dca08e4
commit
7b06acea1c
|
@ -382,7 +382,9 @@ module Ci
|
||||||
private
|
private
|
||||||
|
|
||||||
def update_artifacts_size
|
def update_artifacts_size
|
||||||
self.artifacts_size = artifacts_file.size
|
self.artifacts_size = if artifacts_file.exists?
|
||||||
|
artifacts_file.size
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def erase_trace!
|
def erase_trace!
|
||||||
|
|
|
@ -486,7 +486,7 @@ describe Ci::API::API do
|
||||||
expect(response).to have_http_status(200)
|
expect(response).to have_http_status(200)
|
||||||
expect(build.artifacts_file.exists?).to be_falsy
|
expect(build.artifacts_file.exists?).to be_falsy
|
||||||
expect(build.artifacts_metadata.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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue