summaryrefslogtreecommitdiff
path: root/test/notification_test.exs
diff options
context:
space:
mode:
authorhref <href@random.sh>2020-05-12 21:06:23 +0200
committerhref <href@random.sh>2020-05-12 21:14:46 +0200
commit37c2deb3ddcd473be9a55bbbd48b370b67a0384a (patch)
tree013c4dc8c22e10aa055fb5bb0a938501b29288c3 /test/notification_test.exs
parenta6283bbae13a873af969336bd4e62011777a1a70 (diff)
downloadpleroma-37c2deb3ddcd473be9a55bbbd48b370b67a0384a.tar.gz
pleroma-37c2deb3ddcd473be9a55bbbd48b370b67a0384a.zip
Expand and authorize streams in Streamer directly (backport from !2519)
Diffstat (limited to 'test/notification_test.exs')
-rw-r--r--test/notification_test.exs11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/notification_test.exs b/test/notification_test.exs
index e12418db3..d04754a9d 100644
--- a/test/notification_test.exs
+++ b/test/notification_test.exs
@@ -164,12 +164,13 @@ defmodule Pleroma.NotificationTest do
user = insert(:user)
task = Task.async(fn -> assert_receive {:text, _}, 4_000 end)
task_user_notification = Task.async(fn -> assert_receive {:text, _}, 4_000 end)
- Streamer.add_socket("user", %{transport_pid: task.pid, assigns: %{user: user}})
- Streamer.add_socket(
- "user:notification",
- %{transport_pid: task_user_notification.pid, assigns: %{user: user}}
- )
+ Streamer.get_topic_and_add_socket("user", %{transport_pid: task.pid, assigns: %{user: user}})
+
+ Streamer.get_topic_and_add_socket("user:notification", %{
+ transport_pid: task_user_notification.pid,
+ assigns: %{user: user}
+ })
activity = insert(:note_activity)