From 2605a0a844f187daeeff1f16920db445f53e2793 Mon Sep 17 00:00:00 2001 From: Josh Frye Date: Wed, 1 Jun 2016 10:50:32 -0400 Subject: Refactor. Add tests. --- features/project/builds/summary.feature | 1 + features/steps/project/builds/summary.rb | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'features') diff --git a/features/project/builds/summary.feature b/features/project/builds/summary.feature index 3c029a973df..550ebccf0d7 100644 --- a/features/project/builds/summary.feature +++ b/features/project/builds/summary.feature @@ -24,3 +24,4 @@ Feature: Project Builds Summary Then recent build has been erased And recent build summary does not have artifacts widget And recent build summary contains information saying that build has been erased + And the build count cache is updated diff --git a/features/steps/project/builds/summary.rb b/features/steps/project/builds/summary.rb index e9e2359146e..374eb0b0e07 100644 --- a/features/steps/project/builds/summary.rb +++ b/features/steps/project/builds/summary.rb @@ -36,4 +36,8 @@ class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps expect(page).to have_content 'Build has been erased' end end + + step 'the build count cache is updated' do + expect(@build.project.running_or_pending_build_count).to eq @build.project.builds.running_or_pending.count(:all) + end end -- cgit v1.2.1