Merge branch 'feature/notification-control-part-2' into 'develop'
notification controls, part 2 See merge request pleroma/pleroma!1204
This commit is contained in:
commit
5402d04e3c
8 changed files with 84 additions and 42 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue