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
652f71f7
Commit
652f71f7
authored
Dec 11, 2020
by
Etienne Baqué
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated MR based on review comments
parent
969f62a8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
ee/app/finders/billed_users_finder.rb
ee/app/finders/billed_users_finder.rb
+1
-1
ee/spec/finders/billed_users_finder_spec.rb
ee/spec/finders/billed_users_finder_spec.rb
+8
-0
No files found.
ee/app/finders/billed_users_finder.rb
View file @
652f71f7
...
...
@@ -8,7 +8,7 @@ class BilledUsersFinder
end
def
execute
return
[]
unless
group_billed_user_ids
.
any?
return
User
.
none
unless
group_billed_user_ids
.
any?
users
=
::
User
.
id_in
(
group_billed_user_ids
)
users
=
users
.
search
(
search_term
)
if
search_term
...
...
ee/spec/finders/billed_users_finder_spec.rb
View file @
652f71f7
...
...
@@ -33,6 +33,14 @@ RSpec.describe BilledUsersFinder do
expect
(
subject
.
execute
).
to
eq
([
john_smith
,
john_doe
].
map
(
&
:user
))
end
end
context
'when a sorting parameter is not provided'
do
subject
{
described_class
.
new
(
group
,
search_term:
search_term
)
}
it
'sorts expected results in name_asc order'
do
expect
(
subject
.
execute
).
to
eq
([
john_doe
,
john_smith
].
map
(
&
:user
))
end
end
end
context
'when a search parameter is not present'
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