diff options
Diffstat (limited to 'spec/serializers/ci/job_serializer_spec.rb')
-rw-r--r-- | spec/serializers/ci/job_serializer_spec.rb | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/spec/serializers/ci/job_serializer_spec.rb b/spec/serializers/ci/job_serializer_spec.rb index d47c9fdbf24..5f889a10f3d 100644 --- a/spec/serializers/ci/job_serializer_spec.rb +++ b/spec/serializers/ci/job_serializer_spec.rb @@ -28,36 +28,4 @@ RSpec.describe Ci::JobSerializer do end end end - - describe '#represent_status' do - context 'for a failed build' do - let(:resource) { create(:ci_build, :failed) } - let(:status) { resource.detailed_status(double('user')) } - - subject { serializer.represent_status(resource) } - - it 'serializes only status' do - expect(subject[:text]).to eq(status.text) - expect(subject[:label]).to eq('failed') - expect(subject[:tooltip]).to eq('failed - (unknown failure)') - expect(subject[:icon]).to eq(status.icon) - expect(subject[:favicon]).to match_asset_path("/assets/ci_favicons/#{status.favicon}.png") - end - end - - context 'for any other type of build' do - let(:resource) { create(:ci_build, :success) } - let(:status) { resource.detailed_status(double('user')) } - - subject { serializer.represent_status(resource) } - - it 'serializes only status' do - expect(subject[:text]).to eq(status.text) - expect(subject[:label]).to eq('passed') - expect(subject[:tooltip]).to eq('passed') - expect(subject[:icon]).to eq(status.icon) - expect(subject[:favicon]).to match_asset_path("/assets/ci_favicons/#{status.favicon}.png") - end - end - end end |