mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: allow user search API to restrict to group
This commit is contained in:
@@ -43,6 +43,16 @@ describe UserSearch do
|
||||
expect(search_for("under_").length).to eq(1)
|
||||
end
|
||||
|
||||
it 'allows filtering by group' do
|
||||
group = Fabricate(:group)
|
||||
sam = Fabricate(:user, username: 'sam')
|
||||
_samantha = Fabricate(:user, username: 'samantha')
|
||||
group.add(sam)
|
||||
|
||||
results = search_for("sam", group: group)
|
||||
expect(results.count).to eq(1)
|
||||
end
|
||||
|
||||
# this is a seriously expensive integration test,
|
||||
# re-creating this entire test db is too expensive reuse
|
||||
it "operates correctly" do
|
||||
|
||||
Reference in New Issue
Block a user