mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 02:58:48 +08:00
FIX: better filter for groups search (#14262)
Follow up of https://github.com/discourse/discourse/pull/14216 Allow plugins to register custom filter with block
This commit is contained in:

committed by
GitHub

parent
cddba50570
commit
e3793e6d7c
@ -935,18 +935,6 @@ describe Group do
|
||||
expect(Group.search_groups('sOmEthi')).to eq([group])
|
||||
expect(Group.search_groups('test2')).to eq([])
|
||||
end
|
||||
|
||||
it 'allows to filter with additional scope' do
|
||||
messageable_group
|
||||
|
||||
expect(Group.search_groups('es', custom_scope: { name: :messageable, arguments: [user] }).sort).to eq([messageable_group, group].sort)
|
||||
|
||||
plugin = Plugin::Instance.new
|
||||
plugin.register_group_scope_for_search(:messageable)
|
||||
expect(Group.search_groups('es', custom_scope: { name: :messageable, arguments: [user] }).sort).to eq([messageable_group].sort)
|
||||
|
||||
DiscoursePluginRegistry.reset!
|
||||
end
|
||||
end
|
||||
|
||||
describe '#bulk_add' do
|
||||
|
Reference in New Issue
Block a user