summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamil Staps <info@camilstaps.nl>2019-02-02 20:53:21 +0100
committerCamil Staps <info@camilstaps.nl>2019-08-07 20:49:16 +0200
commit99bb207ef14d12fe59e23fd70e219ed5e166470b (patch)
tree6103d3c62349e2ed56bfab52c492c0dc3c035fa0
parente8bdcdf0f89d88463f6fb8a67e85f315e6a9097d (diff)
downloadgitlab-ce-99bb207ef14d12fe59e23fd70e219ed5e166470b.tar.gz
Fix tests
-rw-r--r--app/controllers/projects/starrers_controller.rb2
-rw-r--r--app/finders/users_star_projects_finder.rb2
-rw-r--r--lib/api/projects.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/projects/starrers_controller.rb b/app/controllers/projects/starrers_controller.rb
index 006898a7427..8f629eb8d13 100644
--- a/app/controllers/projects/starrers_controller.rb
+++ b/app/controllers/projects/starrers_controller.rb
@@ -9,7 +9,7 @@ class Projects::StarrersController < Projects::ApplicationController
def index
@sort = params[:sort].presence || sort_value_name
- @starrers = UsersStarProjectsFinder.new(params, @project, current_user: @current_user).execute
+ @starrers = UsersStarProjectsFinder.new(@project, params, current_user: @current_user).execute
@total_count = @project.starrers.size
@public_count = @starrers.size
diff --git a/app/finders/users_star_projects_finder.rb b/app/finders/users_star_projects_finder.rb
index e3657f9915c..5b19b98451c 100644
--- a/app/finders/users_star_projects_finder.rb
+++ b/app/finders/users_star_projects_finder.rb
@@ -5,7 +5,7 @@ class UsersStarProjectsFinder
attr_accessor :params
- def initialize(params = {}, project, current_user: nil)
+ def initialize(project, params = {}, current_user: nil)
@params = params
@project = project
@current_user = current_user
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index 6d221200372..996205d4b7b 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -382,7 +382,7 @@ module API
use :pagination
end
get ':id/starrers' do
- starrers = UsersStarProjectsFinder.new(params, user_project, current_user: current_user).execute
+ starrers = UsersStarProjectsFinder.new(user_project, params, current_user: current_user).execute
present paginate(starrers), with: Entities::UserStarsProject
end