summaryrefslogtreecommitdiff
path: root/spec/models/namespace_spec.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-07-27 13:51:04 +0000
committerDouwe Maan <douwe@gitlab.com>2018-07-27 13:51:04 +0000
commit5f84509c05c63130143a9d9ac0c69a00ea10cf4c (patch)
tree47e96dcad9296ffb3005a1b41527b5b735ab4409 /spec/models/namespace_spec.rb
parented81ee9ba2b5a0b68996ccb238bfa4c69a6df062 (diff)
parent7a233b37cd1281698107f1f3236b425bf4cc5ae7 (diff)
downloadgitlab-ce-5f84509c05c63130143a9d9ac0c69a00ea10cf4c.tar.gz
Merge branch 'stop-dynamic-routable-creation' into 'master'
Stop building Route rows on the fly See merge request gitlab-org/gitlab-ce!20313
Diffstat (limited to 'spec/models/namespace_spec.rb')
-rw-r--r--spec/models/namespace_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb
index 8ff16cbd7cc..9b7f932ec3a 100644
--- a/spec/models/namespace_spec.rb
+++ b/spec/models/namespace_spec.rb
@@ -323,6 +323,16 @@ describe Namespace do
parent.update(path: 'mygroup_new')
+ # Routes are loaded when creating the projects, so we need to manually
+ # reload them for the below code to be aware of the above UPDATE.
+ [
+ project_in_parent_group,
+ hashed_project_in_subgroup,
+ legacy_project_in_subgroup
+ ].each do |project|
+ project.route.reload
+ end
+
expect(project_rugged(project_in_parent_group).config['gitlab.fullpath']).to eq "mygroup_new/#{project_in_parent_group.path}"
expect(project_rugged(hashed_project_in_subgroup).config['gitlab.fullpath']).to eq "mygroup_new/mysubgroup/#{hashed_project_in_subgroup.path}"
expect(project_rugged(legacy_project_in_subgroup).config['gitlab.fullpath']).to eq "mygroup_new/mysubgroup/#{legacy_project_in_subgroup.path}"