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:
authorLin Jen-Shin <godfat@godfat.org>2016-10-03 14:35:53 +0300
committerLin Jen-Shin <godfat@godfat.org>2016-10-03 14:35:53 +0300
commitafc0ae5cbef721dad867c2fca9734fa9748b02f2 (patch)
tree10e491ceb0b85167a3a7f2d6fdacb19a3a8b4957 /app/models/concerns
parent752a4cce514f04e0f364f615b817e64e9f40879b (diff)
Fix tests. Check 'success' first (default status)
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/has_status.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/has_status.rb b/app/models/concerns/has_status.rb
index 444a1610afa..72ec5a8525b 100644
--- a/app/models/concerns/has_status.rb
+++ b/app/models/concerns/has_status.rb
@@ -22,8 +22,8 @@ module HasStatus
canceled = scope.canceled.select('count(*)').to_sql
"(CASE
- WHEN (#{builds})=(#{created}) THEN 'created'
WHEN (#{builds})=(#{success}) THEN 'success'
+ WHEN (#{builds})=(#{created}) THEN 'created'
WHEN (#{builds})=(#{success})+(#{skipped}) THEN 'skipped'
WHEN (#{builds})=(#{success})+(#{skipped})+(#{canceled}) THEN 'canceled'
WHEN (#{builds})=(#{created})+(#{skipped})+(#{pending}) THEN 'pending'