From a04bf131e052f12c82e09b22c5e942e99c36d0ee Mon Sep 17 00:00:00 2001 From: Maksim Date: Sun, 16 Jun 2019 10:33:25 +0000 Subject: [#570] add user:notification stream --- test/integration/mastodon_websocket_test.exs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/integration') 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 -- cgit v1.2.3