From a762184cfd3eb721482bb3fc2a87d9ca703d0d65 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Fri, 3 Jun 2022 21:17:16 -0400 Subject: [PATCH] Test that own edits are streamed --- test/pleroma/web/streamer_test.exs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/pleroma/web/streamer_test.exs b/test/pleroma/web/streamer_test.exs index 4b1175034..b87bd2446 100644 --- a/test/pleroma/web/streamer_test.exs +++ b/test/pleroma/web/streamer_test.exs @@ -397,6 +397,17 @@ test "it streams edits in the 'user' stream", %{user: user, token: oauth_token} assert_receive {:render_with_user, _, "status_update.json", ^edited} refute Streamer.filtered_by_user?(user, edited) end + + test "it streams own edits in the 'user' stream", %{user: user, token: oauth_token} do + {:ok, activity} = CommonAPI.post(user, %{status: "hey"}) + + Streamer.get_topic_and_add_socket("user", user, oauth_token) + {:ok, edited} = CommonAPI.update(user, activity, %{status: "mew mew"}) + edited = Pleroma.Activity.normalize(edited) + + assert_receive {:render_with_user, _, "status_update.json", ^edited} + refute Streamer.filtered_by_user?(user, edited) + end end describe "public streams" do