about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authorunarist <m.unarist@gmail.com>2017-07-14 02:31:33 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-07-13 19:31:33 +0200
commitc2753fdfb471209fe7f2cdb8844e049207af8ba3 (patch)
tree398ed4b8eca9fa5c608e214b4b5badf0dedada24 /spec
parentc29c20ab3cda3d4b752c67868925c1fe99d0ac71 (diff)
Make tag search case insensitive again (#4184)
Diffstat (limited to 'spec')
-rw-r--r--spec/models/tag_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/models/tag_spec.rb b/spec/models/tag_spec.rb
index 7c574eabe..555474c44 100644
--- a/spec/models/tag_spec.rb
+++ b/spec/models/tag_spec.rb
@@ -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")