diff options
author | William Pitcock <nenolod@dereferenced.org> | 2018-03-16 05:30:28 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2018-03-16 11:25:41 +0100 |
commit | 0ee6e8af265a1f5ede264ce0f47e5a777b20f3c3 (patch) | |
tree | 0c0e174ab413b560a64401836043c374f20e3071 | |
parent | 000b3f1837d81f46e183f21150972c8c0b0a9115 (diff) | |
download | pleroma-0ee6e8af265a1f5ede264ce0f47e5a777b20f3c3.tar.gz pleroma-0ee6e8af265a1f5ede264ce0f47e5a777b20f3c3.zip |
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>
-rw-r--r-- | test/web/mastodon_api/status_view_test.exs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs index 0d396f3b8..9e2bc3c18 100644 --- a/test/web/mastodon_api/status_view_test.exs +++ b/test/web/mastodon_api/status_view_test.exs @@ -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}) |