Commit 99bb207e authored by Camil Staps's avatar Camil Staps

Fix tests

parent e8bdcdf0
...@@ -9,7 +9,7 @@ class Projects::StarrersController < Projects::ApplicationController ...@@ -9,7 +9,7 @@ class Projects::StarrersController < Projects::ApplicationController
def index def index
@sort = params[:sort].presence || sort_value_name @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 @total_count = @project.starrers.size
@public_count = @starrers.size @public_count = @starrers.size
......
...@@ -5,7 +5,7 @@ class UsersStarProjectsFinder ...@@ -5,7 +5,7 @@ class UsersStarProjectsFinder
attr_accessor :params attr_accessor :params
def initialize(params = {}, project, current_user: nil) def initialize(project, params = {}, current_user: nil)
@params = params @params = params
@project = project @project = project
@current_user = current_user @current_user = current_user
......
...@@ -382,7 +382,7 @@ module API ...@@ -382,7 +382,7 @@ module API
use :pagination use :pagination
end end
get ':id/starrers' do 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 present paginate(starrers), with: Entities::UserStarsProject
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment