search: refactor to pass in the current user explicitly.

This commit is contained in:
evazion
2022-09-22 04:16:28 -05:00
parent b56b6c554b
commit 88ac91f5f3
82 changed files with 233 additions and 280 deletions

View File

@@ -135,13 +135,13 @@ class NoteTest < ActiveSupport::TestCase
context "where the body contains the string 'aaa'" do
should "return a hit" do
assert_equal(1, Note.search(body_matches: "aaa").count)
assert_search_equals(@note, body_matches: "aaa")
end
end
context "where the body contains the string 'bbb'" do
should "return no hits" do
assert_equal(0, Note.search(body_matches: "bbb").count)
assert_search_equals([], body_matches: "bbb")
end
end
end