diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2019-10-29 21:33:17 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2019-11-28 22:13:11 +0300 |
commit | 04a8ffbe84c6d40709860e75fffa0330a2db690f (patch) | |
tree | 037b79301ef01dd723e5e4f839b6e4c92f71f901 /test/user/notification_setting_test.exs | |
parent | a52da55eb9c6bbf8a08bf1d90d59a48dc25f5907 (diff) | |
download | pleroma-04a8ffbe84c6d40709860e75fffa0330a2db690f.tar.gz |
added privacy option to push notifications
Diffstat (limited to 'test/user/notification_setting_test.exs')
-rw-r--r-- | test/user/notification_setting_test.exs | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/test/user/notification_setting_test.exs b/test/user/notification_setting_test.exs index d1f766eb3..4744d7b4a 100644 --- a/test/user/notification_setting_test.exs +++ b/test/user/notification_setting_test.exs @@ -12,29 +12,10 @@ defmodule Pleroma.User.NotificationSettingTest do changeset = NotificationSetting.changeset( %NotificationSetting{}, - %{"privacy_option" => "name_only"} + %{"privacy_option" => true} ) assert %Ecto.Changeset{valid?: true} = changeset end - - test "returns invalid changeset when privacy option is incorrect" do - changeset = - NotificationSetting.changeset( - %NotificationSetting{}, - %{"privacy_option" => "full_content"} - ) - - assert %Ecto.Changeset{valid?: false} = changeset - - assert [ - privacy_option: - {"is invalid", - [ - validation: :inclusion, - enum: ["name_and_message", "name_only", "no_name_or_message"] - ]} - ] = changeset.errors - end end end |