Commit 4b039e5d authored by Robert Speicher's avatar Robert Speicher

Don't attempt to override a `set` with a `let`

parent 92facb46
Pipeline #18911320 passed with stages
in 87 minutes and 9 seconds
......@@ -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'
......
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