X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fintegration%2Fmastodon_websocket_test.exs;h=a604713d800ec83407049116282c78a49ad733b3;hb=de77d7621a781cf409663a8d5e931227e3b2cf82;hp=b42c9ef073deec7672a24cc43b79d20758d9b5f6;hpb=bd961a3badaf7aa7ffc97ab92a6b04367d1c514b;p=akkoma diff --git a/test/integration/mastodon_websocket_test.exs b/test/integration/mastodon_websocket_test.exs index b42c9ef07..a604713d8 100644 --- a/test/integration/mastodon_websocket_test.exs +++ b/test/integration/mastodon_websocket_test.exs @@ -97,5 +97,15 @@ defmodule Pleroma.Integration.MastodonWebsocketTest do test "accepts valid tokens", state do assert {:ok, _} = start_socket("?stream=user&access_token=#{state.token.token}") end + + test "accepts the 'user' stream", %{token: token} = _state do + assert {:ok, _} = start_socket("?stream=user&access_token=#{token.token}") + assert {:error, {403, "Forbidden"}} = start_socket("?stream=user") + end + + test "accepts the 'user:notification' stream", %{token: token} = _state do + assert {:ok, _} = start_socket("?stream=user:notification&access_token=#{token.token}") + assert {:error, {403, "Forbidden"}} = start_socket("?stream=user:notification") + end end end