From 914e50db49c34d152a782f0b4f4cc9fc1957db7c Mon Sep 17 00:00:00 2001 From: David Taylor Date: Mon, 28 Oct 2019 12:32:56 +0000 Subject: [PATCH] DEV: Update users controller spec following user_search update --- spec/requests/users_controller_spec.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/requests/users_controller_spec.rb b/spec/requests/users_controller_spec.rb index b6782f3a64a..45d9268983a 100644 --- a/spec/requests/users_controller_spec.rb +++ b/spec/requests/users_controller_spec.rb @@ -2894,8 +2894,10 @@ describe UsersController do end it "searches only for users who have access to private topic" do + searching_user = Fabricate(:user) privileged_user = Fabricate(:user, trust_level: 4, username: "joecabit", name: "Lawrence Tierney") privileged_group = Fabricate(:group) + privileged_group.add(searching_user) privileged_group.add(privileged_user) privileged_group.save @@ -2905,6 +2907,7 @@ describe UsersController do private_topic = Fabricate(:topic, category: category) + sign_in(searching_user) get "/u/search/users.json", params: { term: user.name.split(" ").last, topic_id: private_topic.id, topic_allowed_users: "true" }