Commit 70489d08 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix invalid assertions in build details entity specs

parent c9749e22
...@@ -140,7 +140,6 @@ FactoryGirl.define do ...@@ -140,7 +140,6 @@ FactoryGirl.define do
end end
trait :erased do trait :erased do
erasable
erased_at Time.now erased_at Time.now
erased_by factory: :user erased_by factory: :user
end end
......
...@@ -87,18 +87,18 @@ describe BuildDetailsEntity do ...@@ -87,18 +87,18 @@ describe BuildDetailsEntity do
end end
end end
context 'when the build has been erased' do context 'when the build has not been erased' do
let(:build) { create(:ci_build, :erased, project: project) } let(:build) { create(:ci_build, :erasable, project: project) }
it 'exposes the user whom erased the build' do it 'exposes a build erase path' do
expect(subject).to include(:erase_path) expect(subject).to include(:erase_path)
end end
end end
context 'when the build has been erased' do context 'when the build has been erased' do
let(:build) { create(:ci_build, :erased, project: project, erased_by: user) } let(:build) { create(:ci_build, :erased, project: project) }
it 'exposes the user whom erased the build' do it 'exposes the user who erased the build' do
expect(subject).to include(:erased_by) expect(subject).to include(:erased_by)
end end
end end
......
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