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:
commit
2bd2fc2046
2 changed files with 24 additions and 0 deletions
9
app/presenters/ci/bridge_presenter.rb
Normal file
9
app/presenters/ci/bridge_presenter.rb
Normal 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
|
15
spec/presenters/ci/bridge_presenter_spec.rb
Normal file
15
spec/presenters/ci/bridge_presenter_spec.rb
Normal 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
|
Loading…
Reference in a new issue