diff options
| author | rinpatch <rinpatch@sdf.org> | 2019-06-16 10:33:25 +0000 | 
|---|---|---|
| committer | rinpatch <rinpatch@sdf.org> | 2019-06-16 10:33:25 +0000 | 
| commit | efa445a75b242787a30ffbc2eb16bd165260f66c (patch) | |
| tree | 8573c525a0c2b2ddf3e6b49870cd413de81b51f0 /test/integration | |
| parent | 57d54a9f095774d856b7966c5fbc08c27fbdd586 (diff) | |
| parent | a04bf131e052f12c82e09b22c5e942e99c36d0ee (diff) | |
| download | pleroma-efa445a75b242787a30ffbc2eb16bd165260f66c.tar.gz pleroma-efa445a75b242787a30ffbc2eb16bd165260f66c.zip  | |
Merge branch 'issues/570' into 'develop'
[#570] add user:notification stream
See merge request pleroma/pleroma!1274
Diffstat (limited to 'test/integration')
| -rw-r--r-- | test/integration/mastodon_websocket_test.exs | 10 | 
1 files changed, 10 insertions, 0 deletions
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  | 
