Merge develop
This commit is contained in:
commit
76c3e290fc
91 changed files with 2854 additions and 1120 deletions
|
|
@ -8,6 +8,7 @@ defmodule Pleroma.NotificationTest do
|
|||
import Pleroma.Factory
|
||||
|
||||
alias Pleroma.Notification
|
||||
alias Pleroma.Tests.ObanHelpers
|
||||
alias Pleroma.User
|
||||
alias Pleroma.Web.ActivityPub.Transmogrifier
|
||||
alias Pleroma.Web.CommonAPI
|
||||
|
|
@ -68,16 +69,7 @@ defmodule Pleroma.NotificationTest do
|
|||
end
|
||||
|
||||
describe "create_notification" do
|
||||
setup do
|
||||
GenServer.start(Streamer, %{}, name: Streamer)
|
||||
|
||||
on_exit(fn ->
|
||||
if pid = Process.whereis(Streamer) do
|
||||
Process.exit(pid, :kill)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
@tag needs_streamer: true
|
||||
test "it creates a notification for user and send to the 'user' and the 'user:notification' stream" do
|
||||
user = insert(:user)
|
||||
task = Task.async(fn -> assert_receive {:text, _}, 4_000 end)
|
||||
|
|
@ -590,7 +582,8 @@ defmodule Pleroma.NotificationTest do
|
|||
|
||||
refute Enum.empty?(Notification.for_user(other_user))
|
||||
|
||||
User.delete(user)
|
||||
{:ok, job} = User.delete(user)
|
||||
ObanHelpers.perform(job)
|
||||
|
||||
assert Enum.empty?(Notification.for_user(other_user))
|
||||
end
|
||||
|
|
@ -635,6 +628,7 @@ defmodule Pleroma.NotificationTest do
|
|||
}
|
||||
|
||||
{:ok, _delete_activity} = Transmogrifier.handle_incoming(delete_user_message)
|
||||
ObanHelpers.perform_all()
|
||||
|
||||
assert Enum.empty?(Notification.for_user(local_user))
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue