From 5df3e8b81b4115f44b1ee56a3531dca6d912756c Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Fri, 2 Dec 2016 12:14:10 +0100 Subject: [PATCH] Add initial implmentation for core success status --- lib/gitlab/ci/status/core/success.rb | 7 +++++++ spec/lib/gitlab/ci/status/core/success_spec.rb | 11 +++++++++++ 2 files changed, 18 insertions(+) create mode 100644 spec/lib/gitlab/ci/status/core/success_spec.rb diff --git a/lib/gitlab/ci/status/core/success.rb b/lib/gitlab/ci/status/core/success.rb index 511a34901f8..7bae4f612cc 100644 --- a/lib/gitlab/ci/status/core/success.rb +++ b/lib/gitlab/ci/status/core/success.rb @@ -2,6 +2,13 @@ module Gitlab::Ci module Status module Core class Success + def label + 'passed' + end + + def icon + 'success' + end end end end diff --git a/spec/lib/gitlab/ci/status/core/success_spec.rb b/spec/lib/gitlab/ci/status/core/success_spec.rb new file mode 100644 index 00000000000..80587956336 --- /dev/null +++ b/spec/lib/gitlab/ci/status/core/success_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe Gitlab::Ci::Status::Core::Success do + describe '#label' do + it { expect(subject.label).to eq 'passed' } + end + + describe '#icon' do + it { expect(subject.icon).to eq 'success' } + end +end