summaryrefslogtreecommitdiff
path: root/test/integration/mastodon_websocket_test.exs
diff options
context:
space:
mode:
authorSachin Joshi <satchin.joshi@gmail.com>2019-06-23 03:25:50 +0000
committerSachin Joshi <satchin.joshi@gmail.com>2019-06-23 03:25:50 +0000
commita0c65bbd6c708b555f457bf24ec07d2d41c3fe4a (patch)
treedeb176014e3c1dcb87fba2fe1108e276c2100148 /test/integration/mastodon_websocket_test.exs
parent1452a96ad6cfd7d250e3f7c10805994cc92016a7 (diff)
parent72f365df07e2eba75d3339629b01e5a8913513e6 (diff)
downloadpleroma-a0c65bbd6c708b555f457bf24ec07d2d41c3fe4a.tar.gz
pleroma-a0c65bbd6c708b555f457bf24ec07d2d41c3fe4a.zip
Merge branch 'develop' into 'remove-avatar-header'
# Conflicts: # CHANGELOG.md
Diffstat (limited to 'test/integration/mastodon_websocket_test.exs')
-rw-r--r--test/integration/mastodon_websocket_test.exs10
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