Make sure the algorithm did exclude gaps
This commit is contained in:
parent
defd889905
commit
8d96062f23
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue