Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
705baff2
Commit
705baff2
authored
Sep 27, 2021
by
drew cimino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assert destroyed pipeline in Projects::DestroyService spec
parent
4866cbed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
spec/services/projects/destroy_service_spec.rb
spec/services/projects/destroy_service_spec.rb
+3
-1
No files found.
spec/services/projects/destroy_service_spec.rb
View file @
705baff2
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment