Commit 0e1c67d1 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'rs-ci-build-spec-warnings' into 'master'

Remove RSpec warnings from `spec/models/ci/build_spec.rb`

See merge request gitlab-org/gitlab-ce!17755
parents bd551053 4b039e5d
......@@ -679,21 +679,21 @@ describe Ci::Build do
describe '#erase' do
before do
build.erase(erased_by: user)
build.erase(erased_by: erased_by)
end
context 'erased by user' do
let!(:user) { create(:user, username: 'eraser') }
let!(:erased_by) { create(:user, username: 'eraser') }
include_examples 'erasable'
it 'records user who erased a build' do
expect(build.erased_by).to eq user
expect(build.erased_by).to eq erased_by
end
end
context 'erased by system' do
let(:user) { nil }
let(:erased_by) { nil }
include_examples 'erasable'
......@@ -748,21 +748,21 @@ describe Ci::Build do
describe '#erase' do
before do
build.erase(erased_by: user)
build.erase(erased_by: erased_by)
end
context 'erased by user' do
let!(:user) { create(:user, username: 'eraser') }
let!(:erased_by) { create(:user, username: 'eraser') }
include_examples 'erasable'
it 'records user who erased a build' do
expect(build.erased_by).to eq user
expect(build.erased_by).to eq erased_by
end
end
context 'erased by system' do
let(:user) { nil }
let(:erased_by) { nil }
include_examples 'erasable'
......@@ -1958,7 +1958,7 @@ describe Ci::Build do
context 'when depended job has not been completed yet' do
let!(:pre_stage_job) { create(:ci_build, :manual, pipeline: pipeline, name: 'test', stage_idx: 0) }
it { expect { job.run! }.not_to raise_error(Ci::Build::MissingDependenciesError) }
it { expect { job.run! }.not_to raise_error }
end
context 'when artifacts of depended job has been expired' do
......
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