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

Doh. I already wrote that test and I forgot.

parent 9604f123
...@@ -693,9 +693,9 @@ describe Ci::Build, models: true do ...@@ -693,9 +693,9 @@ describe Ci::Build, models: true do
describe 'Project#builds_for' do describe 'Project#builds_for' do
it 'returns builds from ref and build name' do it 'returns builds from ref and build name' do
latest_build = project.builds_for(build.name, 'HEAD').latest.first build_ids = project.builds_for(build.name, 'HEAD').map(&:id)
expect(latest_build.id).to eq(build.id) expect(build_ids).to eq([build.id])
end end
end end
end end
...@@ -364,20 +364,6 @@ describe Project, models: true do ...@@ -364,20 +364,6 @@ describe Project, models: true do
end end
end end
describe '#builds_for' do
let(:project) { create(:project) }
let(:pipeline) do
create(:ci_pipeline, project: project, sha: project.commit.sha)
end
let(:build) { create(:ci_build, pipeline: pipeline) }
it 'returns builds for a particular ref' do
build_ids = project.builds_for(build.name, build.sha).map(&:id)
expect(build_ids).to eq([build.id])
end
end
describe :default_issues_tracker? do describe :default_issues_tracker? do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:ext_project) { create(:redmine_project) } let(:ext_project) { create(:redmine_project) }
......
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