2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

FIX: Group.search should look up Group#full_name too.

https://meta.discourse.org/t/mentioning-group-by-full-name-doesnt-work/63437/3
This commit is contained in:
Guo Xiang Tan 2017-06-29 16:36:51 +09:00
parent 7b35c55a1e
commit 5e156fbe85
2 changed files with 17 additions and 1 deletions

View file

@ -487,4 +487,18 @@ describe Group do
end
end
end
describe '.search_group' do
let(:group) { Fabricate(:group, name: 'tEsT', full_name: 'eSTt') }
it 'should return the right groups' do
group
expect(Group.search_group('te')).to eq([group])
expect(Group.search_group('TE')).to eq([group])
expect(Group.search_group('es')).to eq([group])
expect(Group.search_group('ES')).to eq([group])
expect(Group.search_group('test2')).to eq([])
end
end
end