diff --git a/app/controllers/discourse_assign/assign_controller.rb b/app/controllers/discourse_assign/assign_controller.rb index 1edbc53..3c340d1 100644 --- a/app/controllers/discourse_assign/assign_controller.rb +++ b/app/controllers/discourse_assign/assign_controller.rb @@ -289,7 +289,7 @@ module DiscourseAssign .where("ucf.name is NULL") .assign_allowed .order("X.last_assigned DESC") - .limit(6) + .limit(5) end end end diff --git a/spec/requests/assign_controller_spec.rb b/spec/requests/assign_controller_spec.rb index c9611b7..3f8bae9 100644 --- a/spec/requests/assign_controller_spec.rb +++ b/spec/requests/assign_controller_spec.rb @@ -98,13 +98,13 @@ RSpec.describe DiscourseAssign::AssignController do describe "#suggestions" do before { sign_in(user) } - it "suggests the current user + the last 6 previously assigned users" do + it "suggests the current user + the last 5 previously assigned users" do assignees = 10.times.map { |_| assign_user_to_post.username } get "/assign/suggestions.json" suggestions = response.parsed_body["suggestions"].map { |u| u["username"] } - expect(suggestions).to contain_exactly(user.username, *assignees[4..9]) + expect(suggestions).to contain_exactly(user.username, *assignees[5..9]) end it "doesn't suggest users on holiday" do