Commit c3c0406a authored by Lin Jen-Shin's avatar Lin Jen-Shin

Use let! feedback:

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347/diffs#note_13173336

let! is not very flexible but I guess it's fine since this is not in
top-level anyway.
parent cd449a73
...@@ -675,14 +675,10 @@ describe Ci::Build, models: true do ...@@ -675,14 +675,10 @@ describe Ci::Build, models: true do
end end
describe 'Project#latest_successful_builds_for' do describe 'Project#latest_successful_builds_for' do
let(:build) do let!(:build) do
create(:ci_build, :artifacts, :success, pipeline: pipeline) create(:ci_build, :artifacts, :success, pipeline: pipeline)
end end
before do
build
end
context 'with succeed pipeline' do context 'with succeed pipeline' do
it 'returns builds from ref' do it 'returns builds from ref' do
builds = project.latest_successful_builds_for('fix') builds = project.latest_successful_builds_for('fix')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment