Add pipeline bridge presenter

This commit is contained in:
Grzegorz Bizon 2019-04-03 12:20:26 +02:00
parent 7700e02988
commit 9fe8106e34
2 changed files with 24 additions and 0 deletions

View file

@ -0,0 +1,9 @@
# frozen_string_literal: true
module Ci
class BridgePresenter < CommitStatusPresenter
def detailed_status
@detailed_status ||= subject.detailed_status(user)
end
end
end

View file

@ -0,0 +1,15 @@
require 'spec_helper'
describe Ci::BridgePresenter do
set(:project) { create(:project) }
set(:pipeline) { create(:ci_pipeline, project: project) }
set(:bridge) { create(:ci_bridge, pipeline: pipeline, status: :failed) }
subject(:presenter) do
described_class.new(bridge)
end
it 'presents information about recoverable state' do
expect(presenter).to be_recoverable
end
end