diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-12-10 16:25:49 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-12-12 12:34:17 +0300 |
commit | 320b6d965e59a0d732f516c6d821af7de60e8477 (patch) | |
tree | 25a9b85441fa19863ceeccd79854cb8429fb9fdb /spec/models/ci/bridge_spec.rb | |
parent | f6d8fb6e46c5b966c04647d826ef43c018c5303b (diff) |
Add basic implementation of CI/CD bridge job
Diffstat (limited to 'spec/models/ci/bridge_spec.rb')
-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 |