summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-05-08 18:08:50 +0200
committerlain <lain@soykaf.club>2019-05-08 18:08:50 +0200
commita4598b5e8bc640ffc1a052438e21f3573ff837ee (patch)
tree3d33be3e6a28214bd30ea8fbefe48f0d8271504c /test
parent920bd4705526d8dfa8ada516853bbb4e5438cbf1 (diff)
downloadpleroma-a4598b5e8bc640ffc1a052438e21f3573ff837ee.tar.gz
pleroma-a4598b5e8bc640ffc1a052438e21f3573ff837ee.zip
Visibility: Make it more resilient.
Diffstat (limited to 'test')
-rw-r--r--test/web/activity_pub/visibilty_test.exs10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/web/activity_pub/visibilty_test.exs b/test/web/activity_pub/visibilty_test.exs
index 24b96c4aa..ff0e72401 100644
--- a/test/web/activity_pub/visibilty_test.exs
+++ b/test/web/activity_pub/visibilty_test.exs
@@ -95,4 +95,14 @@ defmodule Pleroma.Web.ActivityPub.VisibilityTest do
refute Visibility.visible_for_user?(private, unrelated)
refute Visibility.visible_for_user?(direct, unrelated)
end
+
+ test "doesn't die when the user doesn't exist",
+ %{
+ direct: direct,
+ user: user
+ } do
+ Repo.delete(user)
+ Cachex.clear(:user_cache)
+ refute Visibility.is_private?(direct)
+ end
end