summaryrefslogtreecommitdiff
path: root/test/web/twitter_api
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-06-03 11:14:52 +0300
committerrinpatch <rinpatch@sdf.org>2019-06-03 11:14:52 +0300
commit026b245dbc2900d90a737f024b87453bf552b62b (patch)
tree8bab0696129f9ba0154879f831cb7543b508a9f2 /test/web/twitter_api
parent5bd41fef8b5aeff53ed6b096e04507d51c93a83a (diff)
parent1236c5dbf55d631b10ad0e73836a2a9cd43ddaa8 (diff)
downloadpleroma-026b245dbc2900d90a737f024b87453bf552b62b.tar.gz
pleroma-026b245dbc2900d90a737f024b87453bf552b62b.zip
Merge branch 'develop' into feature/polls-2-electric-boogalo
Diffstat (limited to 'test/web/twitter_api')
-rw-r--r--test/web/twitter_api/util_controller_test.exs9
-rw-r--r--test/web/twitter_api/views/user_view_test.exs2
2 files changed, 8 insertions, 3 deletions
diff --git a/test/web/twitter_api/util_controller_test.exs b/test/web/twitter_api/util_controller_test.exs
index 2cd82b3e7..cab9e5d90 100644
--- a/test/web/twitter_api/util_controller_test.exs
+++ b/test/web/twitter_api/util_controller_test.exs
@@ -102,7 +102,6 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
conn
|> assign(:user, user)
|> put("/api/pleroma/notification_settings", %{
- "remote" => false,
"followers" => false,
"bar" => 1
})
@@ -110,8 +109,12 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
user = Repo.get(User, user.id)
- assert %{"remote" => false, "local" => true, "followers" => false, "follows" => true} ==
- user.info.notification_settings
+ assert %{
+ "followers" => false,
+ "follows" => true,
+ "non_follows" => true,
+ "non_followers" => true
+ } == user.info.notification_settings
end
end
diff --git a/test/web/twitter_api/views/user_view_test.exs b/test/web/twitter_api/views/user_view_test.exs
index 74526673c..a48fc9b78 100644
--- a/test/web/twitter_api/views/user_view_test.exs
+++ b/test/web/twitter_api/views/user_view_test.exs
@@ -112,9 +112,11 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do
as_user = UserView.render("show.json", %{user: user, for: user})
assert as_user["default_scope"] == user.info.default_scope
assert as_user["no_rich_text"] == user.info.no_rich_text
+ assert as_user["pleroma"]["notification_settings"] == user.info.notification_settings
as_stranger = UserView.render("show.json", %{user: user})
refute as_stranger["default_scope"]
refute as_stranger["no_rich_text"]
+ refute as_stranger["pleroma"]["notification_settings"]
end
test "A user for a given other follower", %{user: user} do