Commit 0c7168b9 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Add information about badge test to core statuses

parent 119757ac
...@@ -2,6 +2,10 @@ module Gitlab::Ci ...@@ -2,6 +2,10 @@ module Gitlab::Ci
module Status module Status
module Core module Core
class Canceled < Core::Base class Canceled < Core::Base
def text
'canceled'
end
def label def label
'canceled' 'canceled'
end end
......
...@@ -2,6 +2,10 @@ module Gitlab::Ci ...@@ -2,6 +2,10 @@ module Gitlab::Ci
module Status module Status
module Core module Core
class Created < Core::Base class Created < Core::Base
def text
'created'
end
def label def label
'created' 'created'
end end
......
...@@ -2,6 +2,10 @@ module Gitlab::Ci ...@@ -2,6 +2,10 @@ module Gitlab::Ci
module Status module Status
module Core module Core
class Failed < Core::Base class Failed < Core::Base
def text
'failed'
end
def label def label
'failed' 'failed'
end end
......
...@@ -2,6 +2,10 @@ module Gitlab::Ci ...@@ -2,6 +2,10 @@ module Gitlab::Ci
module Status module Status
module Core module Core
class Pending < Core::Base class Pending < Core::Base
def text
'pending'
end
def label def label
'pending' 'pending'
end end
......
...@@ -2,6 +2,10 @@ module Gitlab::Ci ...@@ -2,6 +2,10 @@ module Gitlab::Ci
module Status module Status
module Core module Core
class Running < Core::Base class Running < Core::Base
def text
'running'
end
def label def label
'running' 'running'
end end
......
...@@ -2,6 +2,10 @@ module Gitlab::Ci ...@@ -2,6 +2,10 @@ module Gitlab::Ci
module Status module Status
module Core module Core
class Skipped < Core::Base class Skipped < Core::Base
def text
'skipped'
end
def label def label
'skipped' 'skipped'
end end
......
...@@ -2,6 +2,10 @@ module Gitlab::Ci ...@@ -2,6 +2,10 @@ module Gitlab::Ci
module Status module Status
module Core module Core
class Success < Core::Base class Success < Core::Base
def text
'passed'
end
def label def label
'passed' 'passed'
end end
......
...@@ -5,6 +5,10 @@ module Gitlab::Ci ...@@ -5,6 +5,10 @@ module Gitlab::Ci
class SuccessWithWarnings < SimpleDelegator class SuccessWithWarnings < SimpleDelegator
extend Status::Extended::Base extend Status::Extended::Base
def text
'passed'
end
def label def label
'passed with warnings' 'passed with warnings'
end end
......
...@@ -3,6 +3,10 @@ require 'spec_helper' ...@@ -3,6 +3,10 @@ require 'spec_helper'
describe Gitlab::Ci::Status::Core::Canceled do describe Gitlab::Ci::Status::Core::Canceled do
subject { described_class.new(double('subject')) } subject { described_class.new(double('subject')) }
describe '#text' do
it { expect(subject.label).to eq 'canceled' }
end
describe '#label' do describe '#label' do
it { expect(subject.label).to eq 'canceled' } it { expect(subject.label).to eq 'canceled' }
end end
......
...@@ -3,6 +3,10 @@ require 'spec_helper' ...@@ -3,6 +3,10 @@ require 'spec_helper'
describe Gitlab::Ci::Status::Core::Created do describe Gitlab::Ci::Status::Core::Created do
subject { described_class.new(double('subject')) } subject { described_class.new(double('subject')) }
describe '#text' do
it { expect(subject.label).to eq 'created' }
end
describe '#label' do describe '#label' do
it { expect(subject.label).to eq 'created' } it { expect(subject.label).to eq 'created' }
end end
......
...@@ -3,6 +3,10 @@ require 'spec_helper' ...@@ -3,6 +3,10 @@ require 'spec_helper'
describe Gitlab::Ci::Status::Core::Failed do describe Gitlab::Ci::Status::Core::Failed do
subject { described_class.new(double('subject')) } subject { described_class.new(double('subject')) }
describe '#text' do
it { expect(subject.label).to eq 'failed' }
end
describe '#label' do describe '#label' do
it { expect(subject.label).to eq 'failed' } it { expect(subject.label).to eq 'failed' }
end end
......
...@@ -3,6 +3,10 @@ require 'spec_helper' ...@@ -3,6 +3,10 @@ require 'spec_helper'
describe Gitlab::Ci::Status::Core::Pending do describe Gitlab::Ci::Status::Core::Pending do
subject { described_class.new(double('subject')) } subject { described_class.new(double('subject')) }
describe '#text' do
it { expect(subject.label).to eq 'pending' }
end
describe '#label' do describe '#label' do
it { expect(subject.label).to eq 'pending' } it { expect(subject.label).to eq 'pending' }
end end
......
...@@ -3,6 +3,10 @@ require 'spec_helper' ...@@ -3,6 +3,10 @@ require 'spec_helper'
describe Gitlab::Ci::Status::Core::Running do describe Gitlab::Ci::Status::Core::Running do
subject { described_class.new(double('subject')) } subject { described_class.new(double('subject')) }
describe '#text' do
it { expect(subject.label).to eq 'running' }
end
describe '#label' do describe '#label' do
it { expect(subject.label).to eq 'running' } it { expect(subject.label).to eq 'running' }
end end
......
...@@ -3,6 +3,10 @@ require 'spec_helper' ...@@ -3,6 +3,10 @@ require 'spec_helper'
describe Gitlab::Ci::Status::Core::Skipped do describe Gitlab::Ci::Status::Core::Skipped do
subject { described_class.new(double('subject')) } subject { described_class.new(double('subject')) }
describe '#text' do
it { expect(subject.label).to eq 'skipped' }
end
describe '#label' do describe '#label' do
it { expect(subject.label).to eq 'skipped' } it { expect(subject.label).to eq 'skipped' }
end end
......
...@@ -3,6 +3,10 @@ require 'spec_helper' ...@@ -3,6 +3,10 @@ require 'spec_helper'
describe Gitlab::Ci::Status::Core::Success do describe Gitlab::Ci::Status::Core::Success do
subject { described_class.new(double('subject')) } subject { described_class.new(double('subject')) }
describe '#text' do
it { expect(subject.label).to eq 'passed' }
end
describe '#label' do describe '#label' do
it { expect(subject.label).to eq 'passed' } it { expect(subject.label).to eq 'passed' }
end end
......
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