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
06c90e57
Commit
06c90e57
authored
Oct 12, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix more broken specs
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
081957d1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
spec/helpers/search_helper_spec.rb
spec/helpers/search_helper_spec.rb
+1
-1
spec/lib/gitlab/elastic/search_results_spec.rb
spec/lib/gitlab/elastic/search_results_spec.rb
+3
-3
No files found.
spec/helpers/search_helper_spec.rb
View file @
06c90e57
...
@@ -64,7 +64,7 @@ describe SearchHelper do
...
@@ -64,7 +64,7 @@ describe SearchHelper do
parsed_result
=
helper
.
parse_search_result_from_elastic
(
result
)
parsed_result
=
helper
.
parse_search_result_from_elastic
(
result
)
expect
(
parsed_result
.
ref
).
to
eq
(
'
5937ac0a7beb003549fc5fd26fc247adbce4a52e
'
)
expect
(
parsed_result
.
ref
).
to
eq
(
'
b83d6e391c22777fca1ed3012fce84f633d7fed0
'
)
expect
(
parsed_result
.
filename
).
to
eq
(
'files/ruby/popen.rb'
)
expect
(
parsed_result
.
filename
).
to
eq
(
'files/ruby/popen.rb'
)
expect
(
parsed_result
.
startline
).
to
eq
(
2
)
expect
(
parsed_result
.
startline
).
to
eq
(
2
)
expect
(
parsed_result
.
data
).
to
include
(
"Popen"
)
expect
(
parsed_result
.
data
).
to
include
(
"Popen"
)
...
...
spec/lib/gitlab/elastic/search_results_spec.rb
View file @
06c90e57
...
@@ -391,7 +391,7 @@ describe Gitlab::Elastic::SearchResults, lib: true do
...
@@ -391,7 +391,7 @@ describe Gitlab::Elastic::SearchResults, lib: true do
expect
(
results
.
blobs_count
).
to
eq
5
expect
(
results
.
blobs_count
).
to
eq
5
results
=
described_class
.
new
(
user
,
'def'
,
[
project_1
.
id
,
project_2
.
id
])
results
=
described_class
.
new
(
user
,
'def'
,
[
project_1
.
id
,
project_2
.
id
])
expect
(
results
.
blobs_count
).
to
eq
8
expect
(
results
.
blobs_count
).
to
eq
10
end
end
it
'returns zero when blobs are not found'
do
it
'returns zero when blobs are not found'
do
...
@@ -413,7 +413,7 @@ describe Gitlab::Elastic::SearchResults, lib: true do
...
@@ -413,7 +413,7 @@ describe Gitlab::Elastic::SearchResults, lib: true do
commits
=
results
.
objects
(
'commits'
)
commits
=
results
.
objects
(
'commits'
)
expect
(
commits
.
first
.
message
).
to
include
(
"Add"
)
expect
(
commits
.
first
.
message
).
to
include
(
"Add"
)
expect
(
results
.
commits_count
).
to
eq
5
expect
(
results
.
commits_count
).
to
eq
24
end
end
it
'finds commits from public projects only'
do
it
'finds commits from public projects only'
do
...
@@ -425,7 +425,7 @@ describe Gitlab::Elastic::SearchResults, lib: true do
...
@@ -425,7 +425,7 @@ describe Gitlab::Elastic::SearchResults, lib: true do
expect
(
results
.
commits_count
).
to
eq
24
expect
(
results
.
commits_count
).
to
eq
24
results
=
described_class
.
new
(
user
,
'add'
,
[
project_1
.
id
,
project_2
.
id
])
results
=
described_class
.
new
(
user
,
'add'
,
[
project_1
.
id
,
project_2
.
id
])
expect
(
results
.
commits_count
).
to
eq
10
expect
(
results
.
commits_count
).
to
eq
48
end
end
it
'returns zero when commits are not found'
do
it
'returns zero when commits are not found'
do
...
...
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