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
70d7ded5
Commit
70d7ded5
authored
Jun 08, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update rename_system_namespace_spec to new validations.
parent
2e97db88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
spec/migrations/rename_system_namespaces_spec.rb
spec/migrations/rename_system_namespaces_spec.rb
+7
-5
No files found.
spec/migrations/rename_system_namespaces_spec.rb
View file @
70d7ded5
...
...
@@ -79,7 +79,9 @@ describe RenameSystemNamespaces, truncate: true do
it
"moves the the repository for a project in the namespace"
do
project
=
build
(
:project
,
namespace:
system_namespace
,
path:
"system-project"
)
save_invalid_routable
(
project
)
TestEnv
.
copy_repo
(
project
)
TestEnv
.
copy_repo
(
project
,
bare_repo:
TestEnv
.
factory_repo_path_bare
,
refs:
TestEnv
::
BRANCH_SHA
)
expected_repo
=
File
.
join
(
TestEnv
.
repos_path
,
"system0"
,
"system-project.git"
)
migration
.
up
...
...
@@ -230,10 +232,10 @@ describe RenameSystemNamespaces, truncate: true do
describe
"#child_ids_for_parent"
do
it
"collects child ids for all levels"
do
parent
=
create
(
:
namespace
)
first_child
=
create
(
:
namespace
,
parent:
parent
)
second_child
=
create
(
:
namespace
,
parent:
parent
)
third_child
=
create
(
:
namespace
,
parent:
second_child
)
parent
=
create
(
:
group
)
first_child
=
create
(
:
group
,
parent:
parent
)
second_child
=
create
(
:
group
,
parent:
parent
)
third_child
=
create
(
:
group
,
parent:
second_child
)
all_ids
=
[
parent
.
id
,
first_child
.
id
,
second_child
.
id
,
third_child
.
id
]
collected_ids
=
migration
.
child_ids_for_parent
(
parent
,
ids:
[
parent
.
id
])
...
...
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