Mastodon API: ensure the notification endpoint doesn't return less than the requested amount of records unless it's the last page
This commit is contained in:
parent
271ea5068f
commit
b15cfc3d36
8 changed files with 112 additions and 41 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue