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
83d02a0b
Commit
83d02a0b
authored
Mar 08, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change name to username
parent
a46c91f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/finders/pipelines_finder.rb
app/finders/pipelines_finder.rb
+1
-1
spec/finders/pipelines_finder_spec.rb
spec/finders/pipelines_finder_spec.rb
+1
-1
No files found.
app/finders/pipelines_finder.rb
View file @
83d02a0b
...
@@ -81,7 +81,7 @@ class PipelinesFinder
...
@@ -81,7 +81,7 @@ class PipelinesFinder
def
by_username
(
items
)
def
by_username
(
items
)
if
params
[
:username
].
present?
if
params
[
:username
].
present?
items
.
joins
(
:user
).
where
(
"users.name = ?"
,
params
[
:username
])
items
.
joins
(
:user
).
where
(
"users.
user
name = ?"
,
params
[
:username
])
else
else
items
items
end
end
...
...
spec/finders/pipelines_finder_spec.rb
View file @
83d02a0b
...
@@ -144,7 +144,7 @@ describe PipelinesFinder do
...
@@ -144,7 +144,7 @@ describe PipelinesFinder do
context
'when a username is passed'
do
context
'when a username is passed'
do
context
'when a username exists'
do
context
'when a username exists'
do
let
(
:params
)
{
{
username:
user1
.
name
}
}
let
(
:params
)
{
{
username:
user1
.
user
name
}
}
it
'selects all pipelines which belong to the username'
do
it
'selects all pipelines which belong to the username'
do
expect
(
subject
).
to
match_array
(
Ci
::
Pipeline
.
where
(
user:
user1
))
expect
(
subject
).
to
match_array
(
Ci
::
Pipeline
.
where
(
user:
user1
))
...
...
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