summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-09-02 21:16:40 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-09-02 21:16:40 +0800
commit8d96062f2386a4e9c30631c35cb41f827cc25beb (patch)
tree50e7042dad6a283faf3dcde760899a64c4e79069
parentdefd8899056c26593939243b05c365605ac06fdc (diff)
downloadgitlab-ce-8d96062f2386a4e9c30631c35cb41f827cc25beb.tar.gz
Make sure the algorithm did exclude gaps
-rw-r--r--spec/models/ci/pipeline_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb
index 4615daa6551..2c04ef298bc 100644
--- a/spec/models/ci/pipeline_spec.rb
+++ b/spec/models/ci/pipeline_spec.rb
@@ -126,7 +126,7 @@ describe Ci::Pipeline, models: true do
let(:current) { Time.now.change(usec: 0) }
let(:build) { create_build('build1', current, 10) }
let(:build_b) { create_build('build2', current, 20) }
- let(:build_c) { create_build('build3', current + 40, 20) }
+ let(:build_c) { create_build('build3', current + 50, 10) }
describe '#duration and #pending_duration' do
before do
@@ -156,7 +156,7 @@ describe Ci::Pipeline, models: true do
pipeline.reload
expect(pipeline.duration).to eq(40)
- expect(pipeline.pending_duration).to eq(35)
+ expect(pipeline.pending_duration).to eq(25)
end
end