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
5b66acec
Commit
5b66acec
authored
Mar 26, 2019
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move EE-specific code in destroy_pipeline_service_spec.rb
parent
425909a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
10 deletions
+21
-10
ee/spec/services/ci/destroy_pipeline_service_spec.rb
ee/spec/services/ci/destroy_pipeline_service_spec.rb
+21
-0
spec/services/ci/destroy_pipeline_service_spec.rb
spec/services/ci/destroy_pipeline_service_spec.rb
+0
-10
No files found.
ee/spec/services/ci/destroy_pipeline_service_spec.rb
0 → 100644
View file @
5b66acec
# frozen_string_literal: true
require
'spec_helper'
describe
::
Ci
::
DestroyPipelineService
do
let
(
:project
)
{
create
(
:project
)
}
let!
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
let
(
:user
)
{
project
.
owner
}
subject
{
described_class
.
new
(
project
,
user
).
execute
(
pipeline
)
}
context
'when audit events is enabled'
do
before
do
stub_licensed_features
(
extended_audit_events:
true
,
admin_audit_log:
true
)
end
it
'does not log an audit event'
do
expect
{
subject
}.
not_to
change
{
SecurityEvent
.
count
}
end
end
end
spec/services/ci/destroy_pipeline_service_spec.rb
View file @
5b66acec
...
...
@@ -17,16 +17,6 @@ describe ::Ci::DestroyPipelineService do
expect
{
pipeline
.
reload
}.
to
raise_error
(
ActiveRecord
::
RecordNotFound
)
end
context
'when audit events is enabled'
do
before
do
stub_licensed_features
(
extended_audit_events:
true
,
admin_audit_log:
true
)
end
it
'does not log an audit event'
do
expect
{
subject
}.
not_to
change
{
SecurityEvent
.
count
}
end
end
context
'when the pipeline has jobs'
do
let!
(
:build
)
{
create
(
:ci_build
,
project:
project
,
pipeline:
pipeline
)
}
...
...
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