Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
421ba4aa
Commit
421ba4aa
authored
Mar 25, 2019
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure the EE hooks can't break again
parent
971401b9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
0 deletions
+59
-0
ee/spec/services/search/global_service_spec.rb
ee/spec/services/search/global_service_spec.rb
+15
-0
ee/spec/services/search/group_service_spec.rb
ee/spec/services/search/group_service_spec.rb
+13
-0
ee/spec/services/search/project_service_spec.rb
ee/spec/services/search/project_service_spec.rb
+16
-0
ee/spec/services/search/snippet_service_spec.rb
ee/spec/services/search/snippet_service_spec.rb
+15
-0
No files found.
ee/spec/services/search/global_service_spec.rb
0 → 100644
View file @
421ba4aa
require
'spec_helper'
describe
Search
::
GlobalService
do
let
(
:user
)
{
create
(
:user
)
}
describe
'elasticsearch'
do
before
do
stub_ee_application_setting
(
elasticsearch_search:
true
,
elasticsearch_indexing:
true
)
end
subject
(
:results
)
{
described_class
.
new
(
user
,
search:
'*'
).
execute
}
it
{
is_expected
.
to
be_a
(
::
Gitlab
::
Elastic
::
SearchResults
)
}
end
end
ee/spec/services/search/group_service_spec.rb
View file @
421ba4aa
...
...
@@ -54,4 +54,17 @@ describe Search::GroupService do
include_examples
'group search'
end
describe
'elasticsearch result'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
)
}
before
do
stub_ee_application_setting
(
elasticsearch_search:
true
,
elasticsearch_indexing:
true
)
end
subject
(
:results
)
{
described_class
.
new
(
user
,
group
,
search:
'*'
).
execute
}
it
{
is_expected
.
to
be_a
(
::
Gitlab
::
Elastic
::
GroupSearchResults
)
}
end
end
ee/spec/services/search/project_service_spec.rb
0 → 100644
View file @
421ba4aa
require
'spec_helper'
describe
Search
::
ProjectService
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
describe
'elasticsearch'
do
before
do
stub_ee_application_setting
(
elasticsearch_search:
true
,
elasticsearch_indexing:
true
)
end
subject
(
:results
)
{
described_class
.
new
(
project
,
user
,
search:
'*'
).
execute
}
it
{
is_expected
.
to
be_a
(
::
Gitlab
::
Elastic
::
ProjectSearchResults
)
}
end
end
ee/spec/services/search/snippet_service_spec.rb
0 → 100644
View file @
421ba4aa
require
'spec_helper'
describe
Search
::
SnippetService
do
let
(
:user
)
{
create
(
:user
)
}
describe
'elasticsearch'
do
before
do
stub_ee_application_setting
(
elasticsearch_search:
true
,
elasticsearch_indexing:
true
)
end
subject
(
:results
)
{
described_class
.
new
(
user
,
search:
'*'
).
execute
}
it
{
is_expected
.
to
be_a
(
::
Gitlab
::
Elastic
::
SnippetSearchResults
)
}
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment