search: refactor to pass in the current user explicitly.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user