Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ci/lib/charts_spec.rb')
-rw-r--r--spec/ci/lib/charts_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/ci/lib/charts_spec.rb b/spec/ci/lib/charts_spec.rb
new file mode 100644
index 00000000000..236cfc2a1f6
--- /dev/null
+++ b/spec/ci/lib/charts_spec.rb
@@ -0,0 +1,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 == [2]
+ end
+ end
+end