aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2019-10-04 06:47:36 +0200
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2019-10-04 07:11:53 +0200
commit5dc14c89cecc121ffb047c2a7c972af0b0f89ef8 (patch)
tree83850723c7bbc241d40cf88e9f8c845dc67dd054 /test
parent703deb66d9346e0c8a160ec6c138b3b53b5183b6 (diff)
downloadpleroma-5dc14c89cecc121ffb047c2a7c972af0b0f89ef8.tar.gz
notification_view.ex: Make sure `account` isn’t empty
Related: https://git.pleroma.social/pleroma/pleroma/issues/1203
Diffstat (limited to 'test')
-rw-r--r--test/web/mastodon_api/views/notification_view_test.exs6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/web/mastodon_api/views/notification_view_test.exs b/test/web/mastodon_api/views/notification_view_test.exs
index 81ab82e2b..c9043a69a 100644
--- a/test/web/mastodon_api/views/notification_view_test.exs
+++ b/test/web/mastodon_api/views/notification_view_test.exs
@@ -100,5 +100,11 @@ defmodule Pleroma.Web.MastodonAPI.NotificationViewTest do
NotificationView.render("index.json", %{notifications: [notification], for: followed})
assert [expected] == result
+
+ User.perform(:delete, follower)
+ notification = Notification |> Repo.one() |> Repo.preload(:activity)
+
+ assert [] ==
+ NotificationView.render("index.json", %{notifications: [notification], for: followed})
end
end