diff options
author | lain <lain@soykaf.club> | 2020-05-07 09:13:32 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-05-07 09:13:32 +0000 |
commit | 40618418460a35ea5a13c36df594d11297a7ebc6 (patch) | |
tree | 8e9f12f7d029b1302fbfa079a5c07bef87b054b4 /test/notification_test.exs | |
parent | f4c2bf0985f3d65d9caa6f02a71c89db9f070fb1 (diff) | |
parent | 9491ba3e49450e80cd1c21358c01e4e06e3d881d (diff) | |
download | pleroma-40618418460a35ea5a13c36df594d11297a7ebc6.tar.gz pleroma-40618418460a35ea5a13c36df594d11297a7ebc6.zip |
Merge branch 'streamer-worker-registry' into 'develop'
Streamer rework
See merge request pleroma/pleroma!2426
Diffstat (limited to 'test/notification_test.exs')
-rw-r--r-- | test/notification_test.exs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/test/notification_test.exs b/test/notification_test.exs index 601a6c0ca..5c85f3368 100644 --- a/test/notification_test.exs +++ b/test/notification_test.exs @@ -162,14 +162,18 @@ defmodule Pleroma.NotificationTest do @tag needs_streamer: true test "it creates a notification for user and send to the 'user' and the 'user:notification' stream" 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}} - ) + task = + Task.async(fn -> + Streamer.add_socket("user", user) + assert_receive {:render_with_user, _, _, _}, 4_000 + end) + + task_user_notification = + Task.async(fn -> + Streamer.add_socket("user:notification", user) + assert_receive {:render_with_user, _, _, _}, 4_000 + end) activity = insert(:note_activity) |