logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 79225d9b0adcd848502e5ba0bbbb295855a30ba0
parent fd2cfc80d2853c27f4d0c07631849da9b8d73e85
Author: Ekaterina Vaartis <vaartis@kotobank.ch>
Date:   Sat, 22 Jan 2022 21:09:53 +0300

Actually, unlisted posts are indexed

Diffstat:

Mtest/pleroma/search/meilisearch_test.exs12++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/test/pleroma/search/meilisearch_test.exs b/test/pleroma/search/meilisearch_test.exs @@ -71,19 +71,23 @@ defmodule Pleroma.Search.MeilisearchTest do test "doesn't index posts that are not public" do user = insert(:user) - Enum.each(["unlisted", "private", "direct"], fn visiblity -> + Enum.each(["private", "direct"], fn visibility -> {:ok, activity} = CommonAPI.post(user, %{ 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(:_)) end) history = call_history(Meilisearch) - assert Enum.count(history) == 3 + assert Enum.count(history) == 2 end test "deletes posts from index when deleted locally" do