Change name to username
This commit is contained in:
parent
a46c91f432
commit
83d02a0b60
2 changed files with 2 additions and 2 deletions
|
@ -81,7 +81,7 @@ class PipelinesFinder
|
|||
|
||||
def by_username(items)
|
||||
if params[:username].present?
|
||||
items.joins(:user).where("users.name = ?", params[:username])
|
||||
items.joins(:user).where("users.username = ?", params[:username])
|
||||
else
|
||||
items
|
||||
end
|
||||
|
|
|
@ -144,7 +144,7 @@ describe PipelinesFinder do
|
|||
|
||||
context 'when a username is passed' do
|
||||
context 'when a username exists' do
|
||||
let(:params) { { username: user1.name } }
|
||||
let(:params) { { username: user1.username } }
|
||||
|
||||
it 'selects all pipelines which belong to the username' do
|
||||
expect(subject).to match_array(Ci::Pipeline.where(user: user1))
|
||||
|
|
Loading…
Reference in a new issue