This commit is contained in:
Kamil Trzcinski 2016-10-17 14:31:43 +02:00
parent 5c9a54d65f
commit 009da2fc80

View file

@ -23,7 +23,7 @@ describe PipelineMetricsWorker do
it 'records the build start time' do
subject
expect(merge_request.reload.metrics.latest_build_started_at).to eq(pipeline.started_at)
expect(merge_request.reload.metrics.latest_build_started_at).to be_within(1.second).of(pipeline.started_at)
end
it 'clears the build end time' do
@ -39,7 +39,7 @@ describe PipelineMetricsWorker do
it 'records the build end time' do
subject
expect(merge_request.reload.metrics.latest_build_finished_at).to eq(pipeline.finished_at)
expect(merge_request.reload.metrics.latest_build_finished_at).to be_within(1.second).of(pipeline.finished_at)
end
end
end