9b2ae90d2c
Being the good boyscouts, but mainly because of [the comment in the review](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12378#note_33302115) the words used for classes and variables are changed to not use builds anymore.
24 lines
580 B
Ruby
24 lines
580 B
Ruby
require 'spec_helper'
|
|
|
|
describe Ci::Charts, lib: true do
|
|
context "pipeline_times" do
|
|
let(:project) { create(:empty_project) }
|
|
let(:chart) { Ci::Charts::PipelineTime.new(project) }
|
|
|
|
subject { chart.pipeline_times }
|
|
|
|
before do
|
|
create(:ci_empty_pipeline, project: project, duration: 120)
|
|
end
|
|
|
|
it 'returns pipeline times in minutes' do
|
|
is_expected.to contain_exactly(2)
|
|
end
|
|
|
|
it 'handles nil pipeline times' do
|
|
create(:ci_empty_pipeline, project: project, duration: nil)
|
|
|
|
is_expected.to contain_exactly(2, 0)
|
|
end
|
|
end
|
|
end
|