summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2017-08-16 14:04:41 +0100
committerBob Van Landuyt <bob@vanlanduyt.co>2018-06-05 20:47:42 +0200
commit9c6c17cbcdb8bf8185fc1b873dcfd08f723e4df5 (patch)
tree624dba30e87ed0ea39afa0535d92c37c7718daef /spec/lib/gitlab
parent67dc43db2f30095cce7fe01d7f475d084be936e8 (diff)
downloadgitlab-ce-9c6c17cbcdb8bf8185fc1b873dcfd08f723e4df5.tar.gz
Add a minimal GraphQL API
Diffstat (limited to 'spec/lib/gitlab')
-rw-r--r--spec/lib/gitlab/path_regex_spec.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/lib/gitlab/path_regex_spec.rb b/spec/lib/gitlab/path_regex_spec.rb
index a40330d853f..e90e0aba0a4 100644
--- a/spec/lib/gitlab/path_regex_spec.rb
+++ b/spec/lib/gitlab/path_regex_spec.rb
@@ -90,11 +90,13 @@ describe Gitlab::PathRegex do
let(:routes_not_starting_in_wildcard) { routes_without_format.select { |p| p !~ %r{^/[:*]} } }
let(:top_level_words) do
- words = routes_not_starting_in_wildcard.map do |route|
- route.split('/')[1]
- end.compact
-
- (words + ee_top_level_words + files_in_public + Array(API::API.prefix.to_s)).uniq
+ routes_not_starting_in_wildcard
+ .map { |route| route.split('/')[1] }
+ .concat(ee_top_level_words)
+ .concat(files_in_public)
+ .concat(Array(API::API.prefix.to_s))
+ .compact
+ .uniq
end
let(:ee_top_level_words) do