diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2019-10-04 06:47:36 +0200 |
---|---|---|
committer | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2019-10-04 07:11:53 +0200 |
commit | 5dc14c89cecc121ffb047c2a7c972af0b0f89ef8 (patch) | |
tree | 83850723c7bbc241d40cf88e9f8c845dc67dd054 /test | |
parent | 703deb66d9346e0c8a160ec6c138b3b53b5183b6 (diff) | |
download | pleroma-5dc14c89cecc121ffb047c2a7c972af0b0f89ef8.tar.gz pleroma-5dc14c89cecc121ffb047c2a7c972af0b0f89ef8.zip |
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.exs | 6 |
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 |