Rename Activity.Search to Search.DatabaseSearch
This commit is contained in:
parent
0fae71f88d
commit
a6946048fb
12 changed files with 181 additions and 193 deletions
|
|
@ -2,8 +2,8 @@
|
|||
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
defmodule Pleroma.Activity.SearchTest do
|
||||
alias Pleroma.Activity.Search
|
||||
defmodule Pleroma.Search.DatabaseSearchTest do
|
||||
alias Pleroma.Search.DatabaseSearch
|
||||
alias Pleroma.Web.CommonAPI
|
||||
import Pleroma.Factory
|
||||
|
||||
|
|
@ -13,7 +13,7 @@ defmodule Pleroma.Activity.SearchTest do
|
|||
user = insert(:user)
|
||||
{:ok, post} = CommonAPI.post(user, %{status: "it's wednesday my dudes"})
|
||||
|
||||
[result] = Search.search(nil, "wednesday")
|
||||
[result] = DatabaseSearch.search(nil, "wednesday")
|
||||
|
||||
assert result.id == post.id
|
||||
end
|
||||
|
|
@ -45,7 +45,7 @@ defmodule Pleroma.Activity.SearchTest do
|
|||
{:ok, _post2} = CommonAPI.post(user, %{status: "it's wednesday my bros"})
|
||||
|
||||
# plainto doesn't understand complex queries
|
||||
assert [result] = Search.search(nil, "wednesday -dudes")
|
||||
assert [result] = DatabaseSearch.search(nil, "wednesday -dudes")
|
||||
|
||||
assert result.id == post.id
|
||||
end
|
||||
|
|
@ -55,7 +55,7 @@ defmodule Pleroma.Activity.SearchTest do
|
|||
{:ok, _post} = CommonAPI.post(user, %{status: "it's wednesday my dudes"})
|
||||
{:ok, other_post} = CommonAPI.post(user, %{status: "it's wednesday my bros"})
|
||||
|
||||
assert [result] = Search.search(nil, "wednesday -dudes")
|
||||
assert [result] = DatabaseSearch.search(nil, "wednesday -dudes")
|
||||
|
||||
assert result.id == other_post.id
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue