diff options
author | Ivan Tashkinov <ivant.business@gmail.com> | 2019-03-27 15:41:40 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivant.business@gmail.com> | 2019-03-27 15:41:40 +0300 |
commit | 20e0f3660541f19cf878b789aa9f5b9d5ce8cddb (patch) | |
tree | 08cb90d62e431beb7ee6a2261dc679b725aec1f1 /test/web/twitter_api/util_controller_test.exs | |
parent | 2a95014b9d7142aa2549e70f428293af78fae8eb (diff) | |
parent | 15aa94f40f73444d67da7cb71ec219b97ec5142e (diff) | |
download | pleroma-20e0f3660541f19cf878b789aa9f5b9d5ce8cddb.tar.gz pleroma-20e0f3660541f19cf878b789aa9f5b9d5ce8cddb.zip |
Merge remote-tracking branch 'remotes/origin/develop' into twitter_oauth
Diffstat (limited to 'test/web/twitter_api/util_controller_test.exs')
-rw-r--r-- | test/web/twitter_api/util_controller_test.exs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/web/twitter_api/util_controller_test.exs b/test/web/twitter_api/util_controller_test.exs index 6e8a25056..832fdc096 100644 --- a/test/web/twitter_api/util_controller_test.exs +++ b/test/web/twitter_api/util_controller_test.exs @@ -75,6 +75,29 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do end describe "GET /api/statusnet/config.json" do + test "returns the state of safe_dm_mentions flag", %{conn: conn} do + option = Pleroma.Config.get([:instance, :safe_dm_mentions]) + Pleroma.Config.put([:instance, :safe_dm_mentions], true) + + response = + conn + |> get("/api/statusnet/config.json") + |> json_response(:ok) + + assert response["site"]["safeDMMentionsEnabled"] == "1" + + Pleroma.Config.put([:instance, :safe_dm_mentions], false) + + response = + conn + |> get("/api/statusnet/config.json") + |> json_response(:ok) + + assert response["site"]["safeDMMentionsEnabled"] == "0" + + Pleroma.Config.put([:instance, :safe_dm_mentions], option) + end + test "it returns the managed config", %{conn: conn} do Pleroma.Config.put([:instance, :managed_config], false) Pleroma.Config.put([:fe], theme: "rei-ayanami-towel") |