summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/status_view_test.exs
diff options
context:
space:
mode:
Diffstat (limited to 'test/web/mastodon_api/status_view_test.exs')
-rw-r--r--test/web/mastodon_api/status_view_test.exs4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs
index 93c0b7236..0d396f3b8 100644
--- a/test/web/mastodon_api/status_view_test.exs
+++ b/test/web/mastodon_api/status_view_test.exs
@@ -56,7 +56,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
test "contains mentions" do
incoming = File.read!("test/fixtures/incoming_reply_mastodon.xml")
- user = insert(:user, %{ap_id: "https://pleroma.soykaf.com/users/lain"})
+ # a user with this ap id might be in the cache.
+ recipient = "https://pleroma.soykaf.com/users/lain"
+ user = User.get_cached_by_ap_id(recipient) || insert(:user, %{ap_id: recipient})
{:ok, [activity]} = OStatus.handle_incoming(incoming)