summaryrefslogtreecommitdiff
path: root/spec/lib/ci/charts_spec.rb
blob: 50a77308cde81d48d3d2df677dc04964f9cb9c4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'spec_helper'

describe Ci::Charts, lib: true do

  context "build_times" do
    before do
      @commit = FactoryGirl.create(:ci_commit)
      FactoryGirl.create(:ci_build, commit: @commit)
    end

    it 'should return build times in minutes' do
      chart = Ci::Charts::BuildTime.new(@commit.project)
      expect(chart.build_times).to eq([2])
    end
  end
end