summaryrefslogtreecommitdiff
path: root/test/user
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-12-09 14:30:35 +0000
committerlain <lain@soykaf.club>2019-12-09 14:30:35 +0000
commite4ea0e20b32152a7f7497c2ec8ebbe5c71b3db47 (patch)
treea4e7c4469be886a588f54112910ea647a6e61b17 /test/user
parent8d2ca85cea7285330c724096b668b4b56b77caf8 (diff)
parent4692919ea68d30fbd1147ad9415a4573e31023be (diff)
downloadpleroma-e4ea0e20b32152a7f7497c2ec8ebbe5c71b3db47.tar.gz
pleroma-e4ea0e20b32152a7f7497c2ec8ebbe5c71b3db47.zip
Merge branch 'issue/1342' into 'develop'
[#1342] Added privacy option to push notifications See merge request pleroma/pleroma!1920
Diffstat (limited to 'test/user')
-rw-r--r--test/user/notification_setting_test.exs21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/user/notification_setting_test.exs b/test/user/notification_setting_test.exs
new file mode 100644
index 000000000..4744d7b4a
--- /dev/null
+++ b/test/user/notification_setting_test.exs
@@ -0,0 +1,21 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.User.NotificationSettingTest do
+ use Pleroma.DataCase
+
+ alias Pleroma.User.NotificationSetting
+
+ describe "changeset/2" do
+ test "sets valid privacy option" do
+ changeset =
+ NotificationSetting.changeset(
+ %NotificationSetting{},
+ %{"privacy_option" => true}
+ )
+
+ assert %Ecto.Changeset{valid?: true} = changeset
+ end
+ end
+end