summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@gitlab.com>2017-06-08 10:10:44 +0200
committerBob Van Landuyt <bob@gitlab.com>2017-06-08 16:17:13 +0200
commit70d7ded5b38376809365cadd7e542254003f8210 (patch)
treed6a5a0b11e94863f669d41db95c2bba07a98519d
parent2e97db887cf5acf28143a04badc3cbf77b54ea44 (diff)
downloadgitlab-ce-upstream-9-2-security.tar.gz
Update rename_system_namespace_spec to new validations.upstream-9-2-security
-rw-r--r--spec/migrations/rename_system_namespaces_spec.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/migrations/rename_system_namespaces_spec.rb b/spec/migrations/rename_system_namespaces_spec.rb
index ad1b83d8e2e..626a6005838 100644
--- a/spec/migrations/rename_system_namespaces_spec.rb
+++ b/spec/migrations/rename_system_namespaces_spec.rb
@@ -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])