summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-02-23 17:55:01 -0600
committerDouwe Maan <douwe@selenight.nl>2017-02-23 17:55:01 -0600
commitad640bc5f92ef0456a53dd82004f449cd9d7475d (patch)
tree0da24fad5572f7fe272c15d842f9b1dfe89e7487 /spec/support
parent509ff2ab170802e23646282f1d146a6383b53a66 (diff)
downloadgitlab-ce-ad640bc5f92ef0456a53dd82004f449cd9d7475d.tar.gz
Use Namespace#full_path instead of #path where appropriatedm-more-namespace-full-path
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/issuables_list_metadata_shared_examples.rb2
-rw-r--r--spec/support/markdown_feature.rb5
-rw-r--r--spec/support/test_env.rb4
3 files changed, 6 insertions, 5 deletions
diff --git a/spec/support/issuables_list_metadata_shared_examples.rb b/spec/support/issuables_list_metadata_shared_examples.rb
index 4644c7a6b86..4c0f556e736 100644
--- a/spec/support/issuables_list_metadata_shared_examples.rb
+++ b/spec/support/issuables_list_metadata_shared_examples.rb
@@ -22,7 +22,7 @@ shared_examples 'issuables list meta-data' do |issuable_type, action = nil|
if action
get action
else
- get :index, namespace_id: project.namespace.path, project_id: project.path
+ get :index, namespace_id: project.namespace, project_id: project
end
meta_data = assigns(:issuable_meta_data)
diff --git a/spec/support/markdown_feature.rb b/spec/support/markdown_feature.rb
index a79386b5db9..5980d14c8ae 100644
--- a/spec/support/markdown_feature.rb
+++ b/spec/support/markdown_feature.rb
@@ -79,8 +79,9 @@ class MarkdownFeature
def xproject
@xproject ||= begin
- namespace = create(:namespace, name: 'cross-reference')
- create(:project, namespace: namespace) do |project|
+ group = create(:group, name: 'cross-reference')
+ group2 = create(:group, parent: group, name: 'nested-group')
+ create(:project, namespace: group2) do |project|
project.team << [user, :developer]
end
end
diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb
index 4e63a4cd537..c3aa3ef44c2 100644
--- a/spec/support/test_env.rb
+++ b/spec/support/test_env.rb
@@ -135,7 +135,7 @@ module TestEnv
def copy_repo(project)
base_repo_path = File.expand_path(factory_repo_path_bare)
- target_repo_path = File.expand_path(project.repository_storage_path + "/#{project.namespace.path}/#{project.path}.git")
+ target_repo_path = File.expand_path(project.repository_storage_path + "/#{project.full_path}.git")
FileUtils.mkdir_p(target_repo_path)
FileUtils.cp_r("#{base_repo_path}/.", target_repo_path)
FileUtils.chmod_R 0755, target_repo_path
@@ -152,7 +152,7 @@ module TestEnv
def copy_forked_repo_with_submodules(project)
base_repo_path = File.expand_path(forked_repo_path_bare)
- target_repo_path = File.expand_path(project.repository_storage_path + "/#{project.namespace.path}/#{project.path}.git")
+ target_repo_path = File.expand_path(project.repository_storage_path + "/#{project.full_path}.git")
FileUtils.mkdir_p(target_repo_path)
FileUtils.cp_r("#{base_repo_path}/.", target_repo_path)
FileUtils.chmod_R 0755, target_repo_path