Read about our upcoming Code of Conduct on this issue

Commit 81e89484 authored by Kamil Trzciński's avatar Kamil Trzciński
Browse files

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
......@@ -679,21 +679,21 @@
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 '#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 @@ def create_mr(build, pipeline, factory: :merge_request, created_at: Time.now)
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