diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-27 18:06:20 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-27 18:06:20 +0000 |
commit | 2abb1b54c0305b359b178d6660810e865f619c22 (patch) | |
tree | e388953a0566ef9844b0b98cdb34236049721a14 /spec/presenters | |
parent | 8320f7956d72986f5a7c850874fce4f8b5a8e015 (diff) | |
download | gitlab-ce-2abb1b54c0305b359b178d6660810e865f619c22.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/presenters')
-rw-r--r-- | spec/presenters/ci/build_runner_presenter_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/presenters/ci/build_runner_presenter_spec.rb b/spec/presenters/ci/build_runner_presenter_spec.rb index a4234d14255..fa8791f2257 100644 --- a/spec/presenters/ci/build_runner_presenter_spec.rb +++ b/spec/presenters/ci/build_runner_presenter_spec.rb @@ -207,5 +207,22 @@ describe Ci::BuildRunnerPresenter do end end end + + context 'when persistent pipeline ref exists' do + let(:project) { create(:project, :repository) } + let(:sha) { project.repository.commit.sha } + let(:pipeline) { create(:ci_pipeline, sha: sha, project: project) } + let(:build) { create(:ci_build, pipeline: pipeline) } + + before do + pipeline.persistent_ref.create + end + + it 'exposes the persistent pipeline ref' do + is_expected + .to contain_exactly("+refs/pipelines/#{pipeline.id}:refs/pipelines/#{pipeline.id}", + "+refs/heads/#{build.ref}:refs/remotes/origin/#{build.ref}") + end + end end end |