Merge branch 'backstage/gb/add-pipeline-bridge-presenter' into 'master'

Add pipeline bridge presenter

See merge request gitlab-org/gitlab-ce!26911
This commit is contained in:
Kamil Trzciński 2019-04-04 09:38:15 +00:00
commit 2bd2fc2046
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