Fix object search depending on embeded object
[akkoma] / test / web / mastodon_api / status_view_test.exs
index cc5a84b5d7b3ae92a071c533e8dea81c352455a6..a02c7c21049edb73a25d60653d239b3343cf162f 100644 (file)
@@ -6,9 +6,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
   use Pleroma.DataCase
 
   alias Pleroma.Activity
-  alias Pleroma.User
-  alias Pleroma.Repo
   alias Pleroma.Object
+  alias Pleroma.Repo
+  alias Pleroma.User
   alias Pleroma.Web.CommonAPI
   alias Pleroma.Web.CommonAPI.Utils
   alias Pleroma.Web.MastodonAPI.AccountView
@@ -61,7 +61,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
       |> Map.put("content", nil)
 
     Object.change(note_object, %{data: data})
-    |> Repo.update()
+    |> Object.update_and_set_cache()
 
     User.get_cached_by_ap_id(note.data["actor"])