Merge branch 'develop' into issue/1276

This commit is contained in:
Maksim Pechnikov 2019-10-24 09:23:59 +03:00
commit 99cf1ef9be
89 changed files with 1533 additions and 1361 deletions

View file

@ -139,7 +139,7 @@ defmodule Pleroma.NotificationTest do
test "it disables notifications from followers" do
follower = insert(:user)
followed = insert(:user, info: %{notification_settings: %{"followers" => false}})
followed = insert(:user, notification_settings: %{"followers" => false})
User.follow(follower, followed)
{:ok, activity} = CommonAPI.post(follower, %{"status" => "hey @#{followed.nickname}"})
refute Notification.create_notification(activity, followed)
@ -147,13 +147,13 @@ defmodule Pleroma.NotificationTest do
test "it disables notifications from non-followers" do
follower = insert(:user)
followed = insert(:user, info: %{notification_settings: %{"non_followers" => false}})
followed = insert(:user, notification_settings: %{"non_followers" => false})
{:ok, activity} = CommonAPI.post(follower, %{"status" => "hey @#{followed.nickname}"})
refute Notification.create_notification(activity, followed)
end
test "it disables notifications from people the user follows" do
follower = insert(:user, info: %{notification_settings: %{"follows" => false}})
follower = insert(:user, notification_settings: %{"follows" => false})
followed = insert(:user)
User.follow(follower, followed)
follower = Repo.get(User, follower.id)
@ -162,7 +162,7 @@ defmodule Pleroma.NotificationTest do
end
test "it disables notifications from people the user does not follow" do
follower = insert(:user, info: %{notification_settings: %{"non_follows" => false}})
follower = insert(:user, notification_settings: %{"non_follows" => false})
followed = insert(:user)
{:ok, activity} = CommonAPI.post(followed, %{"status" => "hey @#{follower.nickname}"})
refute Notification.create_notification(activity, follower)