gitlab-org--gitlab-foss/spec/lib/ci/charts_spec.rb
Z.J. van de Weg 9b2ae90d2c Remove references to build in pipeline charts
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.
2017-06-23 14:50:03 +02:00

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