aboutsummaryrefslogtreecommitdiff
path: root/test/support
diff options
context:
space:
mode:
authorTusooa Zhu <tusooa@kazv.moe>2022-08-19 14:09:42 -0400
committerTusooa Zhu <tusooa@kazv.moe>2022-08-19 20:24:24 -0400
commit3522852c6196cafa63804240f52dd593e09ba694 (patch)
tree6bb3d929938bdc5baebed816d1b7382a9d3de790 /test/support
parenteb42e90c4f9ca35a6dc0e84e6f87b6f4b680173c (diff)
downloadpleroma-3522852c6196cafa63804240f52dd593e09ba694.tar.gz
Test that server will disconnect websocket upon token revocation
Diffstat (limited to 'test/support')
-rw-r--r--test/support/websocket_client.ex6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/support/websocket_client.ex b/test/support/websocket_client.ex
index 2660f6151..abe7d5eda 100644
--- a/test/support/websocket_client.ex
+++ b/test/support/websocket_client.ex
@@ -41,6 +41,12 @@ defmodule Pleroma.Integration.WebsocketClient do
{:ok, state}
end
+ @impl true
+ def handle_disconnect(conn_status, state) do
+ send(state.sender, {:close, conn_status})
+ {:ok, state}
+ end
+
@doc false
@impl true
def handle_info({:text, msg}, state) do