summaryrefslogtreecommitdiff
path: root/spec/presenters
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2019-06-05 08:40:19 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2019-06-05 08:40:19 +0000
commit765917dc088bee52a3f95d76fc7f32d408a2af20 (patch)
tree79bf4ea898089de3180768c00a419df529ff0c84 /spec/presenters
parent8c76c051cfb20d8984823f1ff7d5f49e61d72473 (diff)
parentdbd6223211ec5046535544ea3fe0b8986f51a7e1 (diff)
downloadgitlab-ce-765917dc088bee52a3f95d76fc7f32d408a2af20.tar.gz
Merge branch 'revert-git-depth-for-merge-request' into 'master'
Revert a default GIT_DEPTH for MR pipeline See merge request gitlab-org/gitlab-ce!28926
Diffstat (limited to 'spec/presenters')
-rw-r--r--spec/presenters/ci/build_runner_presenter_spec.rb22
1 files changed, 3 insertions, 19 deletions
diff --git a/spec/presenters/ci/build_runner_presenter_spec.rb b/spec/presenters/ci/build_runner_presenter_spec.rb
index ad6cb012d0b..3430111ca9e 100644
--- a/spec/presenters/ci/build_runner_presenter_spec.rb
+++ b/spec/presenters/ci/build_runner_presenter_spec.rb
@@ -136,24 +136,6 @@ describe Ci::BuildRunnerPresenter do
is_expected.to eq(1)
end
end
-
- context 'when pipeline is detached merge request pipeline' do
- let(:merge_request) { create(:merge_request, :with_detached_merge_request_pipeline) }
- let(:pipeline) { merge_request.all_pipelines.first }
- let(:build) { create(:ci_build, ref: pipeline.ref, pipeline: pipeline) }
-
- it 'returns the default git depth for pipelines for merge requests' do
- is_expected.to eq(described_class::DEFAULT_GIT_DEPTH_MERGE_REQUEST)
- end
-
- context 'when pipeline is legacy detached merge request pipeline' do
- let(:merge_request) { create(:merge_request, :with_legacy_detached_merge_request_pipeline) }
-
- it 'behaves as branch pipeline' do
- is_expected.to eq(0)
- end
- end
- end
end
describe '#refspecs' do
@@ -191,7 +173,9 @@ describe Ci::BuildRunnerPresenter do
it 'returns the correct refspecs' do
is_expected
- .to contain_exactly('+refs/merge-requests/1/head:refs/merge-requests/1/head')
+ .to contain_exactly('+refs/heads/*:refs/remotes/origin/*',
+ '+refs/tags/*:refs/tags/*',
+ '+refs/merge-requests/1/head:refs/merge-requests/1/head')
end
context 'when pipeline is legacy detached merge request pipeline' do