Commit f3b9d3bf authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'mo-unify-test-suite-total-count' into 'master'

Unify test suite total_count

See merge request gitlab-org/gitlab!38082
parents 41ceb4ca d4bd7d1d
......@@ -28,7 +28,7 @@ module Gitlab
def total_count
return 0 if suite_error
test_cases.values.sum(&:count)
[success_count, failed_count, skipped_count, error_count].sum
end
# rubocop: enable CodeReuse/ActiveRecord
......
......@@ -50,9 +50,11 @@ RSpec.describe Gitlab::Ci::Reports::TestSuite do
before do
test_suite.add_test_case(test_case_success)
test_suite.add_test_case(test_case_failed)
test_suite.add_test_case(test_case_skipped)
test_suite.add_test_case(test_case_error)
end
it { is_expected.to eq(2) }
it { is_expected.to eq(4) }
end
describe '#total_status' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment