summaryrefslogtreecommitdiff
path: root/spec/helpers/ci_status_helper_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/helpers/ci_status_helper_spec.rb')
-rw-r--r--spec/helpers/ci_status_helper_spec.rb18
1 files changed, 18 insertions, 0 deletions
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