diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-18 14:14:39 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-18 14:14:39 +0000 |
commit | 1eb82b65c554f21d83447f895a6208905fabe112 (patch) | |
tree | ab12f01b3dc46f11c02afea1e470a78f06ca70c2 /spec/models/project_spec.rb | |
parent | 4ab54c2233e91f60a80e5b6fa2181e6899fdcc3e (diff) | |
download | gitlab-ce-stable-branch-foss-test.tar.gz |
Add latest changes from gitlab-org/gitlab@12-3-auto-deploy-20190916stable-branch-foss-test
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r-- | spec/models/project_spec.rb | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 67f64822184..5b4b9c516a0 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -2027,43 +2027,6 @@ describe Project do end end - describe '#latest_pipeline_for_ref' do - let(:project) { create(:project, :repository) } - let(:second_branch) { project.repository.branches[2] } - - let!(:pipeline_for_default_branch) do - create(:ci_empty_pipeline, project: project, sha: project.commit.id, - ref: project.default_branch) - end - let!(:pipeline_for_second_branch) do - create(:ci_empty_pipeline, project: project, sha: second_branch.target, - ref: second_branch.name) - end - - before do - create(:ci_empty_pipeline, project: project, sha: project.commit.parent.id, - ref: project.default_branch) - end - - context 'default repository branch' do - subject { project.latest_pipeline_for_ref(project.default_branch) } - - it { is_expected.to eq(pipeline_for_default_branch) } - end - - context 'provided ref' do - subject { project.latest_pipeline_for_ref(second_branch.name) } - - it { is_expected.to eq(pipeline_for_second_branch) } - end - - context 'bad ref' do - subject { project.latest_pipeline_for_ref(SecureRandom.uuid) } - - it { is_expected.to be_nil } - end - end - describe '#latest_successful_build_for_sha' do let(:project) { create(:project, :repository) } let(:pipeline) { create_pipeline(project) } |