summaryrefslogtreecommitdiff
path: root/test/notification_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-10-18 12:44:53 +0200
committerlain <lain@soykaf.club>2019-10-18 12:44:53 +0200
commit15bbc34c079018f1c988fe9d445bec50e85bbeaf (patch)
tree9235ff42e4a72cebfa8b33adf7c0086fb899ca87 /test/notification_test.exs
parent4ec299ea9c1cf45c42e98d7b33f33a72f5e7a9c0 (diff)
downloadpleroma-15bbc34c079018f1c988fe9d445bec50e85bbeaf.tar.gz
pleroma-15bbc34c079018f1c988fe9d445bec50e85bbeaf.zip
Tests: Capture log.
Diffstat (limited to 'test/notification_test.exs')
-rw-r--r--test/notification_test.exs6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/notification_test.exs b/test/notification_test.exs
index 940913aa6..480c9415b 100644
--- a/test/notification_test.exs
+++ b/test/notification_test.exs
@@ -14,6 +14,8 @@ defmodule Pleroma.NotificationTest do
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.Streamer
+ import ExUnit.CaptureLog
+
describe "create_notifications" do
test "notifies someone when they are directly addressed" do
user = insert(:user)
@@ -533,7 +535,9 @@ defmodule Pleroma.NotificationTest do
assert Enum.empty?(Notification.for_user(user))
- {:error, _} = CommonAPI.favorite(other_user, activity.id)
+ assert capture_log(fn ->
+ {:error, _} = CommonAPI.favorite(other_user, activity.id)
+ end) =~ "[error]"
assert Enum.empty?(Notification.for_user(user))
end