Actually, unlisted posts are indexed
authorEkaterina Vaartis <vaartis@kotobank.ch>
Sat, 22 Jan 2022 18:09:53 +0000 (21:09 +0300)
committerFloatingGhost <hannah@coffee-and-dreams.uk>
Wed, 29 Jun 2022 19:49:45 +0000 (20:49 +0100)
test/pleroma/search/meilisearch_test.exs

index da614577f46d3d9dda27a6a9dddf6e165c8e83bf..04a2d75d916d24d356aa3a084bc54252b391ca2b 100644 (file)
@@ -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