2015-09-25 12:07:36 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
2015-12-23 02:04:40 +05:30
|
|
|
describe Ci::Charts, lib: true do
|
2015-09-25 12:07:36 +05:30
|
|
|
|
|
|
|
context "build_times" do
|
|
|
|
before do
|
2015-10-24 18:46:33 +05:30
|
|
|
@commit = FactoryGirl.create(:ci_commit)
|
2015-09-25 12:07:36 +05:30
|
|
|
FactoryGirl.create(:ci_build, commit: @commit)
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'should return build times in minutes' do
|
2015-10-24 18:46:33 +05:30
|
|
|
chart = Ci::Charts::BuildTime.new(@commit.project)
|
2015-09-25 12:07:36 +05:30
|
|
|
expect(chart.build_times).to eq([2])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|