BigW Consortium Gitlab

charts_spec.rb 375 Bytes
Newer Older
1 2
require 'spec_helper'

Douwe Maan committed
3
describe Ci::Charts, lib: true do
4 5 6

  context "build_times" do
    before do
Kamil Trzcinski committed
7
      @commit = FactoryGirl.create(:ci_commit)
Valery Sizov committed
8
      FactoryGirl.create(:ci_build, commit: @commit)
9 10 11
    end

    it 'should return build times in minutes' do
Kamil Trzcinski committed
12
      chart = Ci::Charts::BuildTime.new(@commit.project)
Valery Sizov committed
13
      expect(chart.build_times).to eq([2])
14 15 16
    end
  end
end