[#570] add user:notification stream
This commit is contained in:
parent
57d54a9f09
commit
a04bf131e0
6 changed files with 130 additions and 31 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue