projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
000b3f1
)
mastodon api tests: invalidate user cache prior to importing a test reply
author
William Pitcock
<nenolod@dereferenced.org>
Fri, 16 Mar 2018 05:30:28 +0000
(
05:30
+0000)
committer
lain
<lain@soykaf.club>
Fri, 16 Mar 2018 10:25:41 +0000
(11:25 +0100)
This is needed to ensure the user cache does not throw nil when creating the mentions
list.
Signed-off-by: lain <lain@soykaf.club>
test/web/mastodon_api/status_view_test.exs
patch
|
blob
|
history
diff --git
a/test/web/mastodon_api/status_view_test.exs
b/test/web/mastodon_api/status_view_test.exs
index 0d396f3b8418a97988b8473631afb3ce96007e24..9e2bc3c185ce8bf4eb2d70b1aaf4b412ed76b604 100644
(file)
--- 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})