Test that own edits are streamed

This commit is contained in:
Tusooa Zhu 2022-06-03 21:17:16 -04:00 committed by Sol Fisher Romanoff
parent a7bf1f27df
commit 920a5c7107
No known key found for this signature in database
GPG key ID: 9D3F2B64F2341B62

View file

@ -388,6 +388,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