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
bbf31de4
Commit
bbf31de4
authored
Jun 16, 2021
by
Rémy Coutable
Committed by
Alex Kalderimis
Jun 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use match_array in ee/spec/services/search_service_spec.rb
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
a210554a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
ee/spec/services/search_service_spec.rb
ee/spec/services/search_service_spec.rb
+4
-4
No files found.
ee/spec/services/search_service_spec.rb
View file @
bbf31de4
...
...
@@ -236,7 +236,7 @@ RSpec.describe SearchService do
project_ids
=
[
accessible_project
.
id
,
accessible_project_2
.
id
].
join
(
','
)
projects
=
described_class
.
new
(
user
,
group_id:
group
.
id
,
project_ids:
project_ids
).
projects
expect
(
projects
).
to
match
[
accessible_project
,
accessible_project_2
]
expect
(
projects
).
to
match
_array
[
accessible_project
,
accessible_project_2
]
end
it
'returns the projects for guests'
do
...
...
@@ -245,14 +245,14 @@ RSpec.describe SearchService do
project_ids
=
[
accessible_project
.
id
,
accessible_project_2
.
id
,
search_project
.
id
].
join
(
','
)
projects
=
described_class
.
new
(
user
,
group_id:
group
.
id
,
project_ids:
project_ids
).
projects
expect
(
projects
).
to
match
[
accessible_project
,
accessible_project_2
,
search_project
]
expect
(
projects
).
to
match
_array
[
accessible_project
,
accessible_project_2
,
search_project
]
end
it
'handles spaces in the param'
do
project_ids
=
[
accessible_project
.
id
,
accessible_project_2
.
id
].
join
(
', '
)
projects
=
described_class
.
new
(
user
,
group_id:
group
.
id
,
project_ids:
project_ids
).
projects
expect
(
projects
).
to
match
[
accessible_project
,
accessible_project_2
]
expect
(
projects
).
to
match
_array
[
accessible_project
,
accessible_project_2
]
end
it
'returns nil if projects param is not a String'
do
...
...
@@ -268,7 +268,7 @@ RSpec.describe SearchService do
project_ids
=
[
accessible_project
.
id
,
inaccessible_project
.
id
].
join
(
','
)
projects
=
described_class
.
new
(
user
,
group_id:
group
.
id
,
project_ids:
project_ids
).
projects
expect
(
projects
).
to
match
[
accessible_project
]
expect
(
projects
).
to
match
_array
[
accessible_project
]
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