diff options
author | Michael Sprauer <Sprauer@inline.de> | 2013-10-29 11:28:16 +0100 |
---|---|---|
committer | Michael Sprauer <Sprauer@inline.de> | 2013-11-13 18:19:44 +0100 |
commit | 9ebcb12e63c5b6ef761216c8a485a3d33e62d83d (patch) | |
tree | b2305c8dc5bf9cd68e5dfb6a1f484bde9b996dac | |
parent | 99b89b243bddb9f9a24e26cf2dff40c26f478132 (diff) | |
download | gitlab-ci-9ebcb12e63c5b6ef761216c8a485a3d33e62d83d.tar.gz |
try to satisfy travis
-rw-r--r-- | app/views/charts/_builds.haml | 7 | ||||
-rw-r--r-- | spec/features/projects_spec.rb | 15 | ||||
-rw-r--r-- | spec/lib/charts_spec.rb | 2 |
3 files changed, 14 insertions, 10 deletions
diff --git a/app/views/charts/_builds.haml b/app/views/charts/_builds.haml index b5a70cc..ea6bc19 100644 --- a/app/views/charts/_builds.haml +++ b/app/views/charts/_builds.haml @@ -15,13 +15,6 @@ %canvas#monthChart.padded{width: 800, height: 300} %fieldset - %legend - Builds chart for last month - (#{date_from_to(Date.today - 30.days, Date.today)}) - - %canvas#monthChart.padded{width: 800, height: 300} - -%fieldset %legend Builds chart for last year %canvas#yearChart.padded{width: 800, height: 400} diff --git a/spec/features/projects_spec.rb b/spec/features/projects_spec.rb index 19722dc..9eac2a1 100644 --- a/spec/features/projects_spec.rb +++ b/spec/features/projects_spec.rb @@ -32,12 +32,23 @@ describe "Projects" do it { page.should have_content 'Build Schedule' } end - describe "GET /projects/:id/chart" do + describe "GET /projects/:id/charts" do before do - visit project_charts_path(@project, 'builds') + visit project_chart_path(@project) end it { page.should have_content @project.name } + it { page.should have_content 'Builds duration chart for last 30 builds' } + end + + describe "GET /projects/:id/charts/builds" do + before do + visit project_chart_path(@project) + end + + it { page.should have_content @project.name } + it { page.should have_content 'Builds chart for last week' } + it { page.should have_content 'Builds chart for last month' } it { page.should have_content 'Builds chart for last year' } end diff --git a/spec/lib/charts_spec.rb b/spec/lib/charts_spec.rb index 4424b57..cc2c704 100644 --- a/spec/lib/charts_spec.rb +++ b/spec/lib/charts_spec.rb @@ -4,7 +4,7 @@ describe "Charts" do context "build_times" do before do - @project = Project.all.first + @project = FactoryGirl.create(:project) FactoryGirl.create(:build, :project_id => @project.id) end it { |