BigW Consortium Gitlab

Commit 2829fa9a by Grzegorz Bizon

Add specs for extracted pipeline-related methods

parent f45358db
......@@ -177,6 +177,24 @@ describe Ci::Pipeline, :mailer do
end
end
describe '#protected_ref?' do
it 'delegates method to project' do
expect(pipeline).not_to be_protected_ref
end
end
describe '#legacy_trigger' do
let(:trigger_request) { create(:ci_trigger_request) }
before do
pipeline.trigger_requests << trigger_request
end
it 'returns first trigger request' do
expect(pipeline.legacy_trigger).to eq trigger_request
end
end
describe '#auto_canceled?' do
subject { pipeline.auto_canceled? }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment