summaryrefslogtreecommitdiff
path: root/spec/models/ci
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2019-04-02 14:07:11 +0700
committerShinya Maeda <shinya@gitlab.com>2019-04-02 15:55:06 +0700
commita04e1d5e32f7ae1740ba8b9daaf3f71a5048126c (patch)
treece9b5458a09928c9827c1bc7e89ec57f97451a52 /spec/models/ci
parentba23d6377c650ecaac420c8085a2cd82737d3ced (diff)
downloadgitlab-ce-a04e1d5e32f7ae1740ba8b9daaf3f71a5048126c.tar.gz
This is for merge request pipelines
Diffstat (limited to 'spec/models/ci')
-rw-r--r--spec/models/ci/pipeline_spec.rb42
1 files changed, 0 insertions, 42 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb
index e76cf376ed1..83b0f172f03 100644
--- a/spec/models/ci/pipeline_spec.rb
+++ b/spec/models/ci/pipeline_spec.rb
@@ -322,48 +322,6 @@ describe Ci::Pipeline, :mailer do
end
end
- describe '.mergeable_merge_request_pipelines' do
- subject { described_class.mergeable_merge_request_pipelines(merge_request) }
-
- let!(:pipeline) do
- create(:ci_pipeline, source: :merge_request_event, merge_request: merge_request, target_sha: target_sha)
- end
-
- let(:merge_request) { create(:merge_request) }
- let(:target_sha) { merge_request.target_branch_sha }
-
- it 'returns mergeable merge pipelines' do
- is_expected.to eq([pipeline])
- end
-
- context 'when target sha does not point the head of the target branch' do
- let(:target_sha) { merge_request.diff_head_sha }
-
- it 'returns empty array' do
- is_expected.to be_empty
- end
- end
- end
-
- describe '#mergeable_merge_request_pipeline?' do
- subject { pipeline.mergeable_merge_request_pipeline? }
-
- let!(:pipeline) do
- create(:ci_pipeline, source: :merge_request_event, merge_request: merge_request, target_sha: target_sha)
- end
-
- let(:merge_request) { create(:merge_request) }
- let(:target_sha) { merge_request.target_branch_sha }
-
- it { is_expected.to be_truthy }
-
- context 'when target sha does not point the head of the target branch' do
- let(:target_sha) { merge_request.diff_head_sha }
-
- it { is_expected.to be_falsy }
- end
- end
-
describe '#merge_request_ref?' do
subject { pipeline.merge_request_ref? }