diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-07-18 20:10:50 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-07-18 20:10:50 +0800 |
commit | 85409a5a10d22bebbc54a9c7b7c76e7c0e11b208 (patch) | |
tree | e9589b9526596939222fb261bbd31be08751a808 /spec/models/build_spec.rb | |
parent | 5c1f75e983c88d4c884a15e9f84550fd256fb07f (diff) | |
download | gitlab-ce-85409a5a10d22bebbc54a9c7b7c76e7c0e11b208.tar.gz |
Use ci_commits.ref (Pipeline#ref) to find builds
Diffstat (limited to 'spec/models/build_spec.rb')
-rw-r--r-- | spec/models/build_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb index a57f0b6886c..53064138a50 100644 --- a/spec/models/build_spec.rb +++ b/spec/models/build_spec.rb @@ -5,7 +5,8 @@ describe Ci::Build, models: true do let(:pipeline) do create(:ci_pipeline, project: project, - sha: project.commit.id) + sha: project.commit.id, + ref: 'fix') end let(:build) { create(:ci_build, pipeline: pipeline) } @@ -698,7 +699,7 @@ describe Ci::Build, models: true do end it 'returns builds from ref' do - builds = project.latest_success_builds_for('HEAD') + builds = project.latest_success_builds_for('fix') expect(builds).to contain_exactly(build) end |