diff options
author | feld <feld@feld.me> | 2020-07-15 15:22:39 +0000 |
---|---|---|
committer | feld <feld@feld.me> | 2020-07-15 15:22:39 +0000 |
commit | 00f9b53f07346d052adab105bde3428c98fc4660 (patch) | |
tree | 67e501144cffd4c3e70f8dc094793c6b2d2fb7b5 /test/web/twitter_api/util_controller_test.exs | |
parent | 0fe36b311c010f9a4bd3c1600ce874c5403a7368 (diff) | |
parent | 34d1d3e93e8642f2b784b5b957551af068c0f7ba (diff) | |
download | pleroma-00f9b53f07346d052adab105bde3428c98fc4660.tar.gz |
Merge branch 'refactor/notification_settings' into 'develop'
Refactor notification settings
See merge request pleroma/pleroma!2602
Diffstat (limited to 'test/web/twitter_api/util_controller_test.exs')
-rw-r--r-- | test/web/twitter_api/util_controller_test.exs | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/test/web/twitter_api/util_controller_test.exs b/test/web/twitter_api/util_controller_test.exs index 76e9369f7..109c1e637 100644 --- a/test/web/twitter_api/util_controller_test.exs +++ b/test/web/twitter_api/util_controller_test.exs @@ -191,7 +191,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do test "it updates notification settings", %{user: user, conn: conn} do conn |> put("/api/pleroma/notification_settings", %{ - "followers" => false, + "block_from_strangers" => true, "bar" => 1 }) |> json_response(:ok) @@ -199,27 +199,21 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do user = refresh_record(user) assert %Pleroma.User.NotificationSetting{ - followers: false, - follows: true, - non_follows: true, - non_followers: true, - privacy_option: false + block_from_strangers: true, + hide_notification_contents: false } == user.notification_settings end - test "it updates notification privacy option", %{user: user, conn: conn} do + test "it updates notification settings to enable hiding contents", %{user: user, conn: conn} do conn - |> put("/api/pleroma/notification_settings", %{"privacy_option" => "1"}) + |> put("/api/pleroma/notification_settings", %{"hide_notification_contents" => "1"}) |> json_response(:ok) user = refresh_record(user) assert %Pleroma.User.NotificationSetting{ - followers: true, - follows: true, - non_follows: true, - non_followers: true, - privacy_option: true + block_from_strangers: false, + hide_notification_contents: true } == user.notification_settings end end |