summaryrefslogtreecommitdiff
path: root/spec/requests
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2019-03-18 17:51:11 +0100
committerBob Van Landuyt <bob@vanlanduyt.co>2019-03-26 13:21:03 +0100
commitd36415b7545fff543f08a5175790e3a92f383475 (patch)
treeb88dfef2992af721191b790ac7a5bc6f1b9eb90b /spec/requests
parentd64452ebfc262cfc1324fcaf116e74bc436413d3 (diff)
downloadgitlab-ce-d36415b7545fff543f08a5175790e3a92f383475.tar.gz
Allow multiple repositories per project
This changes the repository type from a binary `wiki?` to a type. So we can have more than 2 repository types. Now everywhere we called `.wiki?` and expected a boolean, we check that type.
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/api/internal_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb
index b184c92824a..537194b8e11 100644
--- a/spec/requests/api/internal_spec.rb
+++ b/spec/requests/api/internal_spec.rb
@@ -321,7 +321,7 @@ describe API::Internal do
end
context 'with env passed as a JSON' do
- let(:gl_repository) { project.gl_repository(is_wiki: true) }
+ let(:gl_repository) { Gitlab::GlRepository::WIKI.identifier_for_subject(project) }
it 'sets env in RequestStore' do
obj_dir_relative = './objects'
@@ -975,9 +975,9 @@ describe API::Internal do
def gl_repository_for(project_or_wiki)
case project_or_wiki
when ProjectWiki
- project_or_wiki.project.gl_repository(is_wiki: true)
+ Gitlab::GlRepository::WIKI.identifier_for_subject(project_or_wiki.project)
when Project
- project_or_wiki.gl_repository(is_wiki: false)
+ Gitlab::GlRepository::PROJECT.identifier_for_subject(project_or_wiki)
else
nil
end