Commit 705baff2 authored by drew cimino's avatar drew cimino

Assert destroyed pipeline in Projects::DestroyService spec

parent 4866cbed
......@@ -41,13 +41,15 @@ RSpec.describe Projects::DestroyService, :aggregate_failures do
let!(:pending_state) { create(:ci_build_pending_state, build: build) }
it 'deletes build related records' do
expect { destroy_project(project, user, {}) }.to change { Ci::Build.count }.by(-1)
expect { destroy_project(project, user, {}) }
.to change { Ci::Build.count }.by(-1)
.and change { Ci::BuildTraceChunk.count }.by(-1)
.and change { Ci::JobArtifact.count }.by(-2)
.and change { Ci::JobVariable.count }.by(-1)
.and change { Ci::BuildPendingState.count }.by(-1)
.and change { Ci::BuildReportResult.count }.by(-1)
.and change { Ci::BuildRunnerSession.count }.by(-1)
.and change { Ci::Pipeline.count }.by(-1)
end
it 'avoids N+1 queries', skip: 'skipped until fixed in https://gitlab.com/gitlab-org/gitlab/-/issues/24644' 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