about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-07-30 20:29:50 +0200
committerGitHub <noreply@github.com>2019-07-30 20:29:50 +0200
commit92de439c04785530ce15f55cae18590136c75216 (patch)
tree1700bc07eb1750671049e6d5f96126200ad9ceea /spec
parentff789a751a1c730e4d808410411196b76caff39c (diff)
Change hashtag search to only return results that have trended in the past (#11448)
* Change hashtag search to only return results that have trended in the past

A way to eliminate typos and other one-off "junk" results

* Fix excluding exact matches that don't have a score

* Fix tests
Diffstat (limited to 'spec')
-rw-r--r--spec/models/tag_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/tag_spec.rb b/spec/models/tag_spec.rb
index 5f07fd618..9d700849b 100644
--- a/spec/models/tag_spec.rb
+++ b/spec/models/tag_spec.rb
@@ -136,8 +136,8 @@ RSpec.describe Tag, type: :model do
     end
 
     it 'finds the exact matching tag as the first item' do
-      similar_tag = Fabricate(:tag, name: "matchlater")
-      tag = Fabricate(:tag, name: "match")
+      similar_tag = Fabricate(:tag, name: "matchlater", score: 1)
+      tag = Fabricate(:tag, name: "match", score: 1)
 
       results = Tag.search_for("match")