diff options
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/ci/bridge_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/models/ci/bridge_spec.rb b/spec/models/ci/bridge_spec.rb new file mode 100644 index 00000000000..741cdfef1a5 --- /dev/null +++ b/spec/models/ci/bridge_spec.rb @@ -0,0 +1,25 @@ +require 'spec_helper' + +describe Ci::Bridge do + set(:project) { create(:project) } + set(:pipeline) { create(:ci_pipeline, project: project) } + + let(:bridge) do + create(:ci_bridge, pipeline: pipeline) + end + + describe '#tags' do + it 'only has a bridge tag' do + expect(bridge.tags).to eq [:bridge] + end + end + + describe '#detailed_status' do + let(:user) { create(:user) } + let(:status) { bridge.detailed_status(user) } + + it 'returns detailed status object' do + expect(status).to be_a Gitlab::Ci::Status::Success + end + end +end |