aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-06-26 12:45:46 -0500
committerMark Felder <feld@FreeBSD.org>2020-06-26 12:45:46 -0500
commit69848d5c97c9e5d4c14fb5613eb174cb81d5026d (patch)
tree02411c5e177dc5ed853d420095237a9eb8442a47 /test
parentfd5e797379155e5a85deb88dc79f8fbca483948e (diff)
downloadpleroma-69848d5c97c9e5d4c14fb5613eb174cb81d5026d.tar.gz
Rename notification "privacy_option" setting
Diffstat (limited to 'test')
-rw-r--r--test/user/notification_setting_test.exs4
-rw-r--r--test/web/mastodon_api/views/account_view_test.exs2
-rw-r--r--test/web/push/impl_test.exs8
-rw-r--r--test/web/twitter_api/util_controller_test.exs8
4 files changed, 11 insertions, 11 deletions
diff --git a/test/user/notification_setting_test.exs b/test/user/notification_setting_test.exs
index 95bca22c4..308da216a 100644
--- a/test/user/notification_setting_test.exs
+++ b/test/user/notification_setting_test.exs
@@ -8,11 +8,11 @@ defmodule Pleroma.User.NotificationSettingTest do
alias Pleroma.User.NotificationSetting
describe "changeset/2" do
- test "sets valid privacy option" do
+ test "sets option to hide notification contents" do
changeset =
NotificationSetting.changeset(
%NotificationSetting{},
- %{"privacy_option" => true}
+ %{"hide_notification_contents" => true}
)
assert %Ecto.Changeset{valid?: true} = changeset
diff --git a/test/web/mastodon_api/views/account_view_test.exs b/test/web/mastodon_api/views/account_view_test.exs
index b6d820b3f..ce45cb9e9 100644
--- a/test/web/mastodon_api/views/account_view_test.exs
+++ b/test/web/mastodon_api/views/account_view_test.exs
@@ -97,7 +97,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
notification_settings = %{
block_from_strangers: false,
- privacy_option: false
+ hide_notification_contents: false
}
privacy = user.default_scope
diff --git a/test/web/push/impl_test.exs b/test/web/push/impl_test.exs
index b48952b29..15de5e853 100644
--- a/test/web/push/impl_test.exs
+++ b/test/web/push/impl_test.exs
@@ -238,9 +238,9 @@ defmodule Pleroma.Web.Push.ImplTest do
}
end
- test "hides details for notifications when privacy option enabled" do
+ test "hides contents of notifications when option enabled" do
user = insert(:user, nickname: "Bob")
- user2 = insert(:user, nickname: "Rob", notification_settings: %{privacy_option: true})
+ user2 = insert(:user, nickname: "Rob", notification_settings: %{hide_notification_contents: true})
{:ok, activity} =
CommonAPI.post(user, %{
@@ -284,9 +284,9 @@ defmodule Pleroma.Web.Push.ImplTest do
}
end
- test "returns regular content for notifications with privacy option disabled" do
+ test "returns regular content when hiding contents option disabled" do
user = insert(:user, nickname: "Bob")
- user2 = insert(:user, nickname: "Rob", notification_settings: %{privacy_option: false})
+ user2 = insert(:user, nickname: "Rob", notification_settings: %{hide_notification_contents: false})
{:ok, activity} =
CommonAPI.post(user, %{
diff --git a/test/web/twitter_api/util_controller_test.exs b/test/web/twitter_api/util_controller_test.exs
index da3f6fa61..b8ddadb50 100644
--- a/test/web/twitter_api/util_controller_test.exs
+++ b/test/web/twitter_api/util_controller_test.exs
@@ -200,20 +200,20 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
assert %Pleroma.User.NotificationSetting{
block_from_strangers: true,
- privacy_option: false
+ 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{
block_from_strangers: false,
- privacy_option: true
+ hide_notification_contents: true
} == user.notification_settings
end
end