forked from AkkomaGang/akkoma
Actually, unlisted posts are indexed
This commit is contained in:
parent
774b4e165a
commit
09ea3bb694
1 changed files with 8 additions and 4 deletions
|
@ -71,19 +71,23 @@ test "indexes a local post on creation" do
|
||||||
test "doesn't index posts that are not public" do
|
test "doesn't index posts that are not public" do
|
||||||
user = insert(:user)
|
user = insert(:user)
|
||||||
|
|
||||||
Enum.each(["unlisted", "private", "direct"], fn visiblity ->
|
Enum.each(["private", "direct"], fn visibility ->
|
||||||
{:ok, activity} =
|
{:ok, activity} =
|
||||||
CommonAPI.post(user, %{
|
CommonAPI.post(user, %{
|
||||||
status: "guys i just don't wanna leave the swamp",
|
status: "guys i just don't wanna leave the swamp",
|
||||||
visibility: visiblity
|
visibility: visibility
|
||||||
})
|
})
|
||||||
|
|
||||||
Meilisearch.add_to_index(activity)
|
args = %{"op" => "add_to_index", "activity" => activity.id}
|
||||||
|
|
||||||
|
assert_enqueued(worker: SearchIndexingWorker, args: args)
|
||||||
|
assert :ok = perform_job(SearchIndexingWorker, args)
|
||||||
|
|
||||||
assert_not_called(Meilisearch.meili_put(:_))
|
assert_not_called(Meilisearch.meili_put(:_))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
history = call_history(Meilisearch)
|
history = call_history(Meilisearch)
|
||||||
assert Enum.count(history) == 3
|
assert Enum.count(history) == 2
|
||||||
end
|
end
|
||||||
|
|
||||||
test "deletes posts from index when deleted locally" do
|
test "deletes posts from index when deleted locally" do
|
||||||
|
|
Loading…
Reference in a new issue