Make sure the algorithm did exclude gaps

This commit is contained in:
Lin Jen-Shin 2016-09-02 21:16:40 +08:00
parent defd889905
commit 8d96062f23

View file

@ -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