1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2024-12-27 15:05:18 +01:00

mastodon api tests: invalidate user cache prior to importing a test reply

This is needed to ensure the user cache does not throw nil when creating the mentions
list.

Signed-off-by: lain <lain@soykaf.club>
This commit is contained in:
William Pitcock 2018-03-16 05:30:28 +00:00 committed by lain
parent 000b3f1837
commit 0ee6e8af26

View File

@ -60,6 +60,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
recipient = "https://pleroma.soykaf.com/users/lain"
user = User.get_cached_by_ap_id(recipient) || insert(:user, %{ap_id: recipient})
# invalidate the cache
User.invalidate_cache(user)
{:ok, [activity]} = OStatus.handle_incoming(incoming)
status = StatusView.render("status.json", %{activity: activity})