diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-01-17 16:28:44 +0300 |
---|---|---|
committer | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-01-17 16:28:44 +0300 |
commit | 7676ed82397d73a20aad1ae4b47690923ddfb162 (patch) | |
tree | 8e0e0ab17107d3a41122d5b13415118cb91c8608 /test/config | |
parent | ce027fd0ef1080b03e7982e5939b0c7db6e3b783 (diff) | |
download | pleroma-7676ed82397d73a20aad1ae4b47690923ddfb162.tar.gz |
some clean up
Diffstat (limited to 'test/config')
-rw-r--r-- | test/config/config_db_test.exs | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/test/config/config_db_test.exs b/test/config/config_db_test.exs index 6f76008e6..7668bc547 100644 --- a/test/config/config_db_test.exs +++ b/test/config/config_db_test.exs @@ -330,45 +330,6 @@ defmodule Pleroma.ConfigDBTest do {"v1", :v2, Pleroma.Bookmark, 150, false, Phoenix.Socket.V1.JSONSerializer} end - test "tuple with dispatch key" do - binary = ConfigDB.transform(%{"tuple" => [":dispatch", ["{:_, - [ - {\"/api/v1/streaming\", Pleroma.Web.MastodonAPI.WebsocketHandler, []}, - {\"/websocket\", Phoenix.Endpoint.CowboyWebSocket, - {Phoenix.Transports.WebSocket, - {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, [path: \"/websocket\"]}}}, - {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}} - ]}"]]}) - - assert binary == - :erlang.term_to_binary( - {:dispatch, - [ - {:_, - [ - {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []}, - {"/websocket", Phoenix.Endpoint.CowboyWebSocket, - {Phoenix.Transports.WebSocket, - {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, [path: "/websocket"]}}}, - {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}} - ]} - ]} - ) - - assert ConfigDB.from_binary(binary) == - {:dispatch, - [ - {:_, - [ - {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []}, - {"/websocket", Phoenix.Endpoint.CowboyWebSocket, - {Phoenix.Transports.WebSocket, - {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, [path: "/websocket"]}}}, - {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}} - ]} - ]} - end - test "map with string key" do binary = ConfigDB.transform(%{"key" => "value"}) assert binary == :erlang.term_to_binary(%{"key" => "value"}) |