summaryrefslogtreecommitdiff
path: root/spec/presenters/ci/bridge_presenter_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/presenters/ci/bridge_presenter_spec.rb')
-rw-r--r--spec/presenters/ci/bridge_presenter_spec.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/presenters/ci/bridge_presenter_spec.rb b/spec/presenters/ci/bridge_presenter_spec.rb
index 6291c3426e2..bd6c4777d0c 100644
--- a/spec/presenters/ci/bridge_presenter_spec.rb
+++ b/spec/presenters/ci/bridge_presenter_spec.rb
@@ -3,9 +3,10 @@
require 'spec_helper'
RSpec.describe Ci::BridgePresenter do
+ let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project) }
let_it_be(:pipeline) { create(:ci_pipeline, project: project) }
- let_it_be(:bridge) { create(:ci_bridge, pipeline: pipeline, status: :failed) }
+ let_it_be(:bridge) { create(:ci_bridge, pipeline: pipeline, status: :failed, user: user) }
subject(:presenter) do
described_class.new(bridge)
@@ -14,4 +15,10 @@ RSpec.describe Ci::BridgePresenter do
it 'presents information about recoverable state' do
expect(presenter).to be_recoverable
end
+
+ it 'presents the detailed status for the user' do
+ expect(bridge).to receive(:detailed_status).with(user)
+
+ presenter.detailed_status
+ end
end