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
46514315
Commit
46514315
authored
May 06, 2019
by
Mayra Cabrera
Committed by
Robert Speicher
May 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 'nested_groups' to nested group Epic specs
Closes
https://gitlab.com/gitlab-org/gitlab-ee/issues/11513
parent
51593300
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
ee/spec/models/epic_spec.rb
ee/spec/models/epic_spec.rb
+5
-5
No files found.
ee/spec/models/epic_spec.rb
View file @
46514315
...
...
@@ -118,7 +118,7 @@ describe Epic do
expect
(
epic
.
valid_parent?
).
to
be_falsey
end
it
'returns false when level is too deep'
do
it
'returns false when level is too deep'
,
:nested_groups
do
epic1
=
create
(
:epic
,
group:
group
)
epic2
=
create
(
:epic
,
group:
group
,
parent:
epic1
)
epic3
=
create
(
:epic
,
group:
group
,
parent:
epic2
)
...
...
@@ -142,7 +142,7 @@ describe Epic do
expect
(
epic
.
valid_parent?
).
to
be_truthy
end
it
'returns false when total depth after adding would exceed limit'
do
it
'returns false when total depth after adding would exceed limit'
,
:nested_groups
do
child_epic2
=
create
(
:epic
,
group:
group
,
parent:
child_epic1
)
child_epic3
=
create
(
:epic
,
group:
group
,
parent:
child_epic2
)
child_epic4
=
create
(
:epic
,
group:
group
,
parent:
child_epic3
)
...
...
@@ -166,7 +166,7 @@ describe Epic do
expect
(
epic
.
valid_parent?
).
to
be_truthy
end
it
'returns false when total depth after adding would exceed limit'
do
it
'returns false when total depth after adding would exceed limit'
,
:nested_groups
do
root_epic
.
update
(
parent:
create
(
:epic
,
group:
group
))
create
(
:epic
,
group:
group
,
parent:
child_epic1
)
...
...
@@ -185,14 +185,14 @@ describe Epic do
expect
(
epic
.
valid_parent?
).
to
be_falsey
end
it
'returns false when child epic is parent of the given parent'
do
it
'returns false when child epic is parent of the given parent'
,
:nested_groups
do
epic1
=
create
(
:epic
,
group:
group
,
parent:
epic
)
epic
.
parent
=
epic1
expect
(
epic
.
valid_parent?
).
to
be_falsey
end
it
'returns false when child epic is an ancestor of the given parent'
do
it
'returns false when child epic is an ancestor of the given parent'
,
:nested_groups
do
epic1
=
create
(
:epic
,
group:
group
,
parent:
epic
)
epic2
=
create
(
:epic
,
group:
group
,
parent:
epic1
)
epic
.
parent
=
epic2
...
...
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