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
f46565b4
Commit
f46565b4
authored
Aug 21, 2020
by
Eugenia Grieff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add GraphQL mutation tests
parent
aeb6a782
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
ee/changelogs/unreleased/231332-epics-not-inheriting-dates.yml
...angelogs/unreleased/231332-epics-not-inheriting-dates.yml
+5
-0
ee/spec/requests/api/graphql/mutations/epic_tree/reorder_spec.rb
.../requests/api/graphql/mutations/epic_tree/reorder_spec.rb
+19
-1
No files found.
ee/changelogs/unreleased/231332-epics-not-inheriting-dates.yml
0 → 100644
View file @
f46565b4
---
title
:
Update epic inherited dates and create notes when reordering in epic tree
merge_request
:
39742
author
:
type
:
fixed
ee/spec/requests/api/graphql/mutations/epic_tree/reorder_spec.rb
View file @
f46565b4
...
@@ -51,7 +51,7 @@ RSpec.describe 'Updating an epic tree' do
...
@@ -51,7 +51,7 @@ RSpec.describe 'Updating an epic tree' do
context
'when epic feature is enabled'
do
context
'when epic feature is enabled'
do
before
do
before
do
stub_licensed_features
(
epics:
true
)
stub_licensed_features
(
epics:
true
,
subepics:
true
)
end
end
context
'when the user does not have permission'
do
context
'when the user does not have permission'
do
...
@@ -141,6 +141,24 @@ RSpec.describe 'Updating an epic tree' do
...
@@ -141,6 +141,24 @@ RSpec.describe 'Updating an epic tree' do
expect
(
mutation_response
[
'errors'
]).
to
eq
([
"The sibling object's parent must match the current parent epic."
])
expect
(
mutation_response
[
'errors'
]).
to
eq
([
"The sibling object's parent must match the current parent epic."
])
end
end
end
end
context
'when the new parent is another epic and subepics feature is disabled'
do
let
(
:new_parent_id
)
{
GitlabSchema
.
id_from_object
(
base_epic
).
to_s
}
before
do
stub_licensed_features
(
epics:
true
,
subepics:
false
)
other_epic
=
create
(
:epic
,
group:
group
)
epic2
.
update
(
parent:
other_epic
)
end
it_behaves_like
'a mutation that does not update the tree'
it
'returns the error message'
do
post_graphql_mutation
(
mutation
,
current_user:
current_user
)
expect
(
mutation_response
[
'errors'
]).
to
eq
([
'You don\'t have permissions to move the objects.'
])
end
end
end
end
context
'when moving an issue'
do
context
'when moving an issue'
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