diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-09-23 12:34:21 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-09-23 12:34:21 +0200 |
commit | 3b6915d8910296296676e32129138c50bb1b0c5c (patch) | |
tree | b60139f0213436cb30790e587b60dfd134b60908 | |
parent | 21dfaa000d0117fcf70ecd0578d4431362d5c2a1 (diff) | |
download | gitlab-ce-commits-page-ci-status.tar.gz |
Add tests for CiStatusHelper and changelog itemcommits-page-ci-status
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r-- | CHANGELOG | 2 | ||||
-rw-r--r-- | spec/helpers/ci_status_helper_spec.rb | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG index 5d28897425c..80998016563 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.1.0 (unreleased) - - + - Show CI status on all pages where commits list is rendered v 8.0.1 - Improve CI migration procedure and documentation diff --git a/spec/helpers/ci_status_helper_spec.rb b/spec/helpers/ci_status_helper_spec.rb new file mode 100644 index 00000000000..7fc53eb1472 --- /dev/null +++ b/spec/helpers/ci_status_helper_spec.rb @@ -0,0 +1,18 @@ +require 'spec_helper' + +describe CiStatusHelper do + include IconsHelper + + let(:success_commit) { double("Ci::Commit", status: 'success') } + let(:failed_commit) { double("Ci::Commit", status: 'failed') } + + describe 'ci_status_color' do + it { expect(ci_status_icon(success_commit)).to include('fa-check') } + it { expect(ci_status_icon(failed_commit)).to include('fa-close') } + end + + describe 'ci_status_color' do + it { expect(ci_status_color(success_commit)).to eq('green') } + it { expect(ci_status_color(failed_commit)).to eq('red') } + end +end |