diff options
author | eugenijm <eugenijm@protonmail.com> | 2020-05-18 18:46:04 +0300 |
---|---|---|
committer | eugenijm <eugenijm@protonmail.com> | 2020-06-14 18:27:11 +0300 |
commit | b15cfc3d365dcfa5f99159fe06e29de6f8aceb4f (patch) | |
tree | 156ff3c3c0fb6eb12064e536ae5a754048b48af4 /test/notification_test.exs | |
parent | 271ea5068f4e3b901cb3f682e132378246daf452 (diff) | |
download | pleroma-b15cfc3d365dcfa5f99159fe06e29de6f8aceb4f.tar.gz pleroma-b15cfc3d365dcfa5f99159fe06e29de6f8aceb4f.zip |
Mastodon API: ensure the notification endpoint doesn't return less than the requested amount of records unless it's the last page
Diffstat (limited to 'test/notification_test.exs')
-rw-r--r-- | test/notification_test.exs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/notification_test.exs b/test/notification_test.exs index b9bbdceca..526f43fab 100644 --- a/test/notification_test.exs +++ b/test/notification_test.exs @@ -306,6 +306,14 @@ defmodule Pleroma.NotificationTest do assert {:ok, []} == Notification.create_notifications(status) end + + test "it disables notifications from people who are invisible" do + author = insert(:user, invisible: true) + user = insert(:user) + + {:ok, status} = CommonAPI.post(author, %{status: "hey @#{user.nickname}"}) + refute Notification.create_notification(status, user) + end end describe "follow / follow_request notifications" do |