diff options
| author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-09-17 22:53:26 +0300 |
|---|---|---|
| committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-09-17 22:53:26 +0300 |
| commit | 01c1078015c1ddbaa195125034489a14233df206 (patch) | |
| tree | 01c63b7d6a8040decf6e0cd1630b715ca2cb29c6 /test/notification_test.exs | |
| parent | 76068873dbf9da191dd2487158ca88df198b811a (diff) | |
| parent | 79376abae347a5039931f57c581074b6da859827 (diff) | |
| download | pleroma-01c1078015c1ddbaa195125034489a14233df206.tar.gz pleroma-01c1078015c1ddbaa195125034489a14233df206.zip | |
[#1234] Merge remote-tracking branch 'remotes/upstream/develop' into 1234-mastodon-2-4-3-oauth-scopes
# Conflicts:
# lib/pleroma/web/activity_pub/activity_pub_controller.ex
Diffstat (limited to 'test/notification_test.exs')
| -rw-r--r-- | test/notification_test.exs | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/test/notification_test.exs b/test/notification_test.exs index 2a52dad8d..3d2f9a8fc 100644 --- a/test/notification_test.exs +++ b/test/notification_test.exs @@ -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) @@ -588,7 +580,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 @@ -633,6 +626,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 |
