forked from mirrors/akkoma
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:
parent
000b3f1837
commit
0ee6e8af26
1 changed files with 3 additions and 0 deletions
|
@ -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})
|
||||
|
|
Loading…
Reference in a new issue