0
0
Fork 0

Make tag search case insensitive again (#4184)

This commit is contained in:
unarist 2017-07-14 02:31:33 +09:00 committed by Eugen Rochko
parent c29c20ab3c
commit c2753fdfb4
4 changed files with 23 additions and 3 deletions

View file

@ -27,6 +27,15 @@ RSpec.describe Tag, type: :model do
expect(results).to eq [tag]
end
it 'finds tag records in case insensitive' do
tag = Fabricate(:tag, name: "MATCH")
_miss_tag = Fabricate(:tag, name: "miss")
results = Tag.search_for("match")
expect(results).to eq [tag]
end
it 'finds the exact matching tag as the first item' do
similar_tag = Fabricate(:tag, name: "matchlater")
tag = Fabricate(:tag, name: "match")