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

describe "Charts" do

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

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