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
92ac5dc3
Commit
92ac5dc3
authored
Jan 28, 2022
by
Max Woolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restructure failing tests
parent
b7eb6ed7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
ee/spec/requests/api/graphql/mutations/compliance_management/frameworks/destroy_spec.rb
...utations/compliance_management/frameworks/destroy_spec.rb
+10
-10
No files found.
ee/spec/requests/api/graphql/mutations/compliance_management/frameworks/destroy_spec.rb
View file @
92ac5dc3
...
...
@@ -13,10 +13,6 @@ RSpec.describe 'Delete a compliance framework' do
subject
{
post_graphql_mutation
(
mutation
,
current_user:
current_user
)
}
before
do
namespace
.
add_owner
(
current_user
)
end
def
mutation_response
graphql_mutation_response
(
:destroy_compliance_framework
)
end
...
...
@@ -40,6 +36,10 @@ RSpec.describe 'Delete a compliance framework' do
end
context
'current_user is namespace owner'
do
before
do
namespace
.
add_owner
(
current_user
)
end
it
'has no errors'
do
subject
...
...
@@ -50,14 +50,14 @@ RSpec.describe 'Delete a compliance framework' do
expect
{
subject
}.
to
change
{
ComplianceManagement
::
Framework
.
count
}.
by
(
-
1
)
end
end
end
context
'current_user is not namespace owner'
do
it_behaves_like
'a mutation that returns top-level errors'
,
errors:
[
Gitlab
::
Graphql
::
Authorize
::
AuthorizeResource
::
RESOURCE_ACCESS_ERROR
]
context
'current_user is not namespace owner'
do
it_behaves_like
'a mutation that returns top-level errors'
,
errors:
[
Gitlab
::
Graphql
::
Authorize
::
AuthorizeResource
::
RESOURCE_ACCESS_ERROR
]
it
'does not destroy a compliance framework'
do
expect
{
subject
}.
not_to
change
{
ComplianceManagement
::
Framework
.
count
}
it
'does not destroy a compliance framework'
do
expect
{
subject
}.
not_to
change
{
ComplianceManagement
::
Framework
.
count
}
end
end
end
end
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